diff --git a/admin/ajax_products_list.php b/admin/ajax_products_list.php index 03a5f4999..98f9647cb 100644 --- a/admin/ajax_products_list.php +++ b/admin/ajax_products_list.php @@ -58,6 +58,8 @@ if ($excludeIds && $excludeIds != 'NaN') { $excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', true); $exclude_packs = (bool)Tools::getValue('exclude_packs', true); +$bookingProduct = (int) Tools::getValue('booking_product'); + $context = Context::getContext(); $sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, p.`cache_default_attribute` @@ -72,6 +74,7 @@ $sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, imag (!empty($excludePackItself) ? ' AND p.id_product <> '.$excludePackItself.' ' : ' '). ($excludeVirtuals ? 'AND NOT EXISTS (SELECT 1 FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : ''). ($exclude_packs ? 'AND (p.cache_is_pack IS NULL OR p.cache_is_pack = 0)' : ''). + ($bookingProduct ? 'AND p.`booking_product` = '.(int) $bookingProduct : ''). ' GROUP BY p.id_product'; $items = Db::getInstance()->executeS($sql); diff --git a/modules/qloblockcontact/views/css/index.php b/admin/themes/default/css/partials/index.php similarity index 56% rename from modules/qloblockcontact/views/css/index.php rename to admin/themes/default/css/partials/index.php index 0a4a63f52..a2a4c7caf 100644 --- a/modules/qloblockcontact/views/css/index.php +++ b/admin/themes/default/css/partials/index.php @@ -1,29 +1,29 @@ - +* @copyright 2010-2023 Webkul IN +* @license https://store.webkul.com/license.html +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; diff --git a/admin/themes/default/css/partials/ndv3.css b/admin/themes/default/css/partials/ndv3.css new file mode 100644 index 000000000..08efc451f --- /dev/null +++ b/admin/themes/default/css/partials/ndv3.css @@ -0,0 +1 @@ +.dashboard-chart-tooltip{background-color:#333;padding:0px 10px 10px 10px;color:#fff;min-width:100px}.dashboard-chart-tooltip label{display:flex;align-items:baseline;gap:5px;font-weight:bold;padding-top:10px}.dashboard-chart-tooltip .tooltip-content{margin-top:5px}.dashboard-chart-tooltip .tooltip-content p{display:flex;align-items:baseline;gap:5px;text-align:left;padding-left:5px}.dashboard-chart-tooltip .tooltip-data-color{display:flex;flex-direction:column;align-items:baseline;padding:5px;max-width:2px}.dashboard-chart-tooltip .text-danger{color:#FF655C}.dashboard-chart-tooltip .text-success{color:#56CE56} diff --git a/admin/themes/default/css/vendor/nv.d3.css b/admin/themes/default/css/vendor/nv.d3.css index cae834827..0524036c5 100644 --- a/admin/themes/default/css/vendor/nv.d3.css +++ b/admin/themes/default/css/vendor/nv.d3.css @@ -1,769 +1,653 @@ +/* nvd3 version 1.8.6 (https://github.com/novus/nvd3) 2017-08-23 */ +.nvd3 .nv-axis { + pointer-events:none; + opacity: 1; +} + +.nvd3 .nv-axis path { + fill: none; + stroke: #000; + stroke-opacity: .75; + shape-rendering: crispEdges; +} + +.nvd3 .nv-axis path.domain { + stroke-opacity: .75; +} + +.nvd3 .nv-axis.nv-x path.domain { + stroke-opacity: 0; +} + +.nvd3 .nv-axis line { + fill: none; + stroke: #e5e5e5; + shape-rendering: crispEdges; +} + +.nvd3 .nv-axis .zero line, + /*this selector may not be necessary*/ .nvd3 .nv-axis line.zero { + stroke-opacity: .75; +} + +.nvd3 .nv-axis .nv-axisMaxMin text { + font-weight: bold; +} + +.nvd3 .x .nv-axis .nv-axisMaxMin text, +.nvd3 .x2 .nv-axis .nv-axisMaxMin text, +.nvd3 .x3 .nv-axis .nv-axisMaxMin text { + text-anchor: middle; +} + +.nvd3 .nv-axis.nv-disabled { + opacity: 0; +} -/******************** - * HTML CSS - */ +.nvd3 .nv-bars rect { + fill-opacity: .75; + + transition: fill-opacity 250ms linear; +} + +.nvd3 .nv-bars rect.hover { + fill-opacity: 1; +} + +.nvd3 .nv-bars .hover rect { + fill: lightblue; +} + +.nvd3 .nv-bars text { + fill: rgba(0,0,0,0); +} + +.nvd3 .nv-bars .hover text { + fill: rgba(0,0,0,1); +} + +.nvd3 .nv-multibar .nv-groups rect, +.nvd3 .nv-multibarHorizontal .nv-groups rect, +.nvd3 .nv-discretebar .nv-groups rect { + stroke-opacity: 0; + + transition: fill-opacity 250ms linear; +} + +.nvd3 .nv-multibar .nv-groups rect:hover, +.nvd3 .nv-multibarHorizontal .nv-groups rect:hover, +.nvd3 .nv-candlestickBar .nv-ticks rect:hover, +.nvd3 .nv-discretebar .nv-groups rect:hover { + fill-opacity: 1; +} + +.nvd3 .nv-discretebar .nv-groups text, +.nvd3 .nv-multibarHorizontal .nv-groups text { + font-weight: bold; + fill: rgba(0,0,0,1); + stroke: rgba(0,0,0,0); +} - -.chartWrap { - margin: 0; - padding: 0; - overflow: hidden; +/* boxplot CSS */ +.nvd3 .nv-boxplot circle { + fill-opacity: 0.5; } -/******************** - Box shadow and border radius styling -*/ -.nvtooltip.with-3d-shadow, .with-3d-shadow .nvtooltip { - -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2); - -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2); - box-shadow: 0 5px 10px rgba(0,0,0,.2); - - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; +.nvd3 .nv-boxplot circle:hover { + fill-opacity: 1; } -/******************** - * TOOLTIP CSS - */ +.nvd3 .nv-boxplot rect:hover { + fill-opacity: 1; +} + +.nvd3 line.nv-boxplot-median { + stroke: black; +} + +.nv-boxplot-tick:hover { + stroke-width: 2.5px; +} +/* bullet */ +.nvd3.nv-bullet { font: 10px sans-serif; } +.nvd3.nv-bullet .nv-measure { fill-opacity: .8; } +.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; } +.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; } +.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; } +.nvd3.nv-bullet .nv-markerLine { stroke: #000; stroke-width: 1.5px; } +.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; } +.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; } +.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; } +.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; } +.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; } +.nvd3.nv-bullet .nv-subtitle { fill: #999; } + +.nvd3.nv-bullet .nv-range { + fill: #bababa; + fill-opacity: .4; +} + +.nvd3.nv-bullet .nv-range:hover { + fill-opacity: .7; +} + +.nvd3.nv-candlestickBar .nv-ticks .nv-tick { + stroke-width: 1px; +} + +.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover { + stroke-width: 2px; +} + +.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect { + stroke: #2ca02c; + fill: #2ca02c; +} + +.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect { + stroke: #d62728; + fill: #d62728; +} + +.with-transitions .nv-candlestickBar .nv-ticks .nv-tick { + transition: stroke-width 250ms linear, stroke-opacity 250ms linear; +} + +.nvd3.nv-candlestickBar .nv-ticks line { + stroke: #333; +} + +.nv-force-node { + stroke: #fff; + stroke-width: 1.5px; +} + +.nv-force-link { + stroke: #999; + stroke-opacity: .6; +} + +.nv-force-node text { + stroke-width: 0px; +} + +.nvd3 .nv-legend .nv-disabled rect { + /*fill-opacity: 0;*/ +} + +.nvd3 .nv-check-box .nv-box { + fill-opacity:0; + stroke-width:2; +} + +.nvd3 .nv-check-box .nv-check { + fill-opacity:0; + stroke-width:4; +} + +.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check { + fill-opacity:0; + stroke-opacity:0; +} + +.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check { + opacity: 0; +} + +/* line plus bar */ +.nvd3.nv-linePlusBar .nv-bar rect { + fill-opacity: .75; +} + +.nvd3.nv-linePlusBar .nv-bar rect:hover { + fill-opacity: 1; +} +.nvd3 .nv-groups path.nv-line { + fill: none; +} + +.nvd3 .nv-groups path.nv-area { + stroke: none; +} + +.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { + fill-opacity: 0; + stroke-opacity: 0; +} + +.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point { + fill-opacity: .5 !important; + stroke-opacity: .5 !important; +} + + +.with-transitions .nvd3 .nv-groups .nv-point { + transition: stroke-width 250ms linear, stroke-opacity 250ms linear; +} + +.nvd3.nv-scatter .nv-groups .nv-point.hover, +.nvd3 .nv-groups .nv-point.hover { + stroke-width: 7px; + fill-opacity: .95 !important; + stroke-opacity: .95 !important; +} + + +.nvd3 .nv-point-paths path { + stroke: #aaa; + stroke-opacity: 0; + fill: #eee; + fill-opacity: 0; +} + + +.nvd3 .nv-indexLine { + cursor: ew-resize; +} + +/******************** + * SVG CSS + */ + +/******************** + Default CSS for an svg element nvd3 used +*/ +svg.nvd3-svg { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + display: block; + width:100%; + height:100%; +} + +/******************** + Box shadow and border radius styling +*/ +.nvtooltip.with-3d-shadow, .with-3d-shadow .nvtooltip { + box-shadow: 0 5px 10px rgba(0,0,0,.2); + border-radius: 5px; +} + + +.nvd3 text { + font: normal 12px Arial, sans-serif; +} + +.nvd3 .title { + font: bold 14px Arial, sans-serif; +} + +.nvd3 .nv-background { + fill: white; + fill-opacity: 0; +} + +.nvd3.nv-noData { + font-size: 18px; + font-weight: bold; +} + + +/********** +* Brush +*/ + +.nv-brush .extent { + fill-opacity: .125; + shape-rendering: crispEdges; +} + +.nv-brush .resize path { + fill: #eee; + stroke: #666; +} + + +/********** +* Legend +*/ + +.nvd3 .nv-legend .nv-series { + cursor: pointer; +} + +.nvd3 .nv-legend .nv-disabled circle { + fill-opacity: 0; +} + +/* focus */ +.nvd3 .nv-brush .extent { + fill-opacity: 0 !important; +} + +.nvd3 .nv-brushBackground rect { + stroke: #000; + stroke-width: .4; + fill: #fff; + fill-opacity: .7; +} + +/********** +* Print +*/ + +@media print { + .nvd3 text { + stroke-width: 0; + fill-opacity: 1; + } +} + +.nvd3.nv-ohlcBar .nv-ticks .nv-tick { + stroke-width: 1px; +} + +.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover { + stroke-width: 2px; +} + +.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive { + stroke: #2ca02c; +} + +.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative { + stroke: #d62728; +} + + +.nvd3 .background path { + fill: none; + stroke: #EEE; + stroke-opacity: .4; + shape-rendering: crispEdges; +} + +.nvd3 .foreground path { + fill: none; + stroke-opacity: .7; +} + +.nvd3 .nv-parallelCoordinates-brush .extent { + fill: #fff; + fill-opacity: .6; + stroke: gray; + shape-rendering: crispEdges; +} + +.nvd3 .nv-parallelCoordinates .hover { + fill-opacity: 1; + stroke-width: 3px; +} + + +.nvd3 .missingValuesline line { + fill: none; + stroke: black; + stroke-width: 1; + stroke-opacity: 1; + stroke-dasharray: 5, 5; +} + +.nvd3.nv-pie path { + stroke-opacity: 0; + transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; +} + +.nvd3.nv-pie .nv-pie-title { + font-size: 24px; + fill: rgba(19, 196, 249, 0.59); +} + +.nvd3.nv-pie .nv-slice text { + stroke: #000; + stroke-width: 0; +} + +.nvd3.nv-pie path { + stroke: #fff; + stroke-width: 1px; + stroke-opacity: 1; +} + +.nvd3.nv-pie path { + fill-opacity: .7; +} + +.nvd3.nv-pie .hover path { + fill-opacity: 1; +} + +.nvd3.nv-pie .nv-label { + pointer-events: none; +} + +.nvd3.nv-pie .nv-label rect { + fill-opacity: 0; + stroke-opacity: 0; +} + +/* scatter */ +.nvd3 .nv-groups .nv-point.hover { + stroke-width: 20px; + stroke-opacity: .5; +} + +.nvd3 .nv-scatter .nv-point.hover { + fill-opacity: 1; +} + +.nv-noninteractive { + pointer-events: none; +} + +.nv-distx, .nv-disty { + pointer-events: none; +} + +/* sparkline */ +.nvd3.nv-sparkline path { + fill: none; +} + +.nvd3.nv-sparklineplus g.nv-hoverValue { + pointer-events: none; +} + +.nvd3.nv-sparklineplus .nv-hoverValue line { + stroke: #333; + stroke-width: 1.5px; +} + +.nvd3.nv-sparklineplus, +.nvd3.nv-sparklineplus g { + pointer-events: all; +} + +.nvd3 .nv-hoverArea { + fill-opacity: 0; + stroke-opacity: 0; +} + +.nvd3.nv-sparklineplus .nv-xValue, +.nvd3.nv-sparklineplus .nv-yValue { + stroke-width: 0; + font-size: .9em; + font-weight: normal; +} + +.nvd3.nv-sparklineplus .nv-yValue { + stroke: #f66; +} + +.nvd3.nv-sparklineplus .nv-maxValue { + stroke: #2ca02c; + fill: #2ca02c; +} + +.nvd3.nv-sparklineplus .nv-minValue { + stroke: #d62728; + fill: #d62728; +} + +.nvd3.nv-sparklineplus .nv-currentValue { + font-weight: bold; + font-size: 1.1em; +} +/* stacked area */ +.nvd3.nv-stackedarea path.nv-area { + fill-opacity: .7; + stroke-opacity: 0; + transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; +} + +.nvd3.nv-stackedarea path.nv-area.hover { + fill-opacity: .9; +} + + +.nvd3.nv-stackedarea .nv-groups .nv-point { + stroke-opacity: 0; + fill-opacity: 0; +} .nvtooltip { - position: absolute; - background-color: rgba(255,255,255,1.0); - padding: 1px; - border: 1px solid rgba(0,0,0,.2); - z-index: 10000; + position: absolute; + background-color: rgba(255,255,255,1.0); + color: rgba(0,0,0,1.0); + padding: 1px; + border: 1px solid rgba(0,0,0,.2); + z-index: 10000; + display: block; + + font-family: Arial, sans-serif; + font-size: 13px; + text-align: left; + pointer-events: none; + + white-space: nowrap; + + -webkit-user-select: none; + + -moz-user-select: none; + + -ms-user-select: none; + + user-select: none; +} + +.nvtooltip { + background: rgba(255,255,255, 0.8); + border: 1px solid rgba(0,0,0,0.5); + border-radius: 4px; +} + +/*Give tooltips that old fade in transition by + putting a "with-transitions" class on the container div. +*/ +.nvtooltip.with-transitions, .with-transitions .nvtooltip { + transition: opacity 50ms linear; - font-family: Arial; - font-size: 13px; - text-align: left; - pointer-events: none; - - white-space: nowrap; - - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + transition-delay: 200ms; +} + +.nvtooltip.x-nvtooltip, +.nvtooltip.y-nvtooltip { + padding: 8px; +} + +.nvtooltip h3 { + margin: 0; + padding: 4px 14px; + line-height: 18px; + font-weight: normal; + background-color: rgba(247,247,247,0.75); + color: rgba(0,0,0,1.0); + text-align: center; + + border-bottom: 1px solid #ebebeb; + + border-radius: 5px 5px 0 0; +} + +.nvtooltip p { + margin: 0; + padding: 5px 14px; + text-align: center; +} + +.nvtooltip span { + display: inline-block; + margin: 2px 0; +} + +.nvtooltip table { + margin: 6px; + border-spacing:0; +} + + +.nvtooltip table td { + padding: 2px 9px 2px 0; + vertical-align: middle; +} + +.nvtooltip table td.key { + font-weight: normal; } -/*Give tooltips that old fade in transition by - putting a "with-transitions" class on the container div. -*/ -.nvtooltip.with-transitions, .with-transitions .nvtooltip { - transition: opacity 250ms linear; - -moz-transition: opacity 250ms linear; - -webkit-transition: opacity 250ms linear; +.nvtooltip table td.key.total { + font-weight: bold; +} - transition-delay: 250ms; - -moz-transition-delay: 250ms; - -webkit-transition-delay: 250ms; -} - -.nvtooltip.x-nvtooltip, -.nvtooltip.y-nvtooltip { - padding: 8px; -} - -.nvtooltip h3 { - margin: 0; - padding: 4px 14px; - line-height: 18px; - font-weight: normal; - background-color: rgba(247,247,247,0.75); - text-align: center; - - border-bottom: 1px solid #ebebeb; - - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} - -.nvtooltip p { - margin: 0; - padding: 5px 14px; - text-align: center; -} - -.nvtooltip span { - display: inline-block; - margin: 2px 0; -} - -.nvtooltip table { - margin: 6px; - border-spacing:0; -} - - -.nvtooltip table td { - padding: 2px 9px 2px 0; - vertical-align: middle; -} - -.nvtooltip table td.key { - font-weight:normal; -} .nvtooltip table td.value { - text-align: right; - font-weight: bold; -} - -.nvtooltip table tr.highlight td { - padding: 1px 9px 1px 0; - border-bottom-style: solid; - border-bottom-width: 1px; - border-top-style: solid; - border-top-width: 1px; -} - -.nvtooltip table td.legend-color-guide div { - width: 8px; - height: 8px; - vertical-align: middle; -} - -.nvtooltip .footer { - padding: 3px; - text-align: center; -} - - -.nvtooltip-pending-removal { - position: absolute; - pointer-events: none; -} - - -/******************** - * SVG CSS - */ - - -svg { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - /* Trying to get SVG to act like a greedy block in all browsers */ - display: block; - width:100%; - height:100%; -} - - -svg text { - font: normal 12px Arial; -} - -svg .title { - font: bold 14px Arial; -} - -.nvd3 .nv-background { - fill: white; - fill-opacity: 0; - /* - pointer-events: none; - */ -} - -.nvd3.nv-noData { - font-size: 18px; - font-weight: bold; -} - - -/********** -* Brush -*/ - -.nv-brush .extent { - fill-opacity: .125; - shape-rendering: crispEdges; -} - - - -/********** -* Legend -*/ - -.nvd3 .nv-legend .nv-series { - cursor: pointer; -} - -.nvd3 .nv-legend .disabled circle { - fill-opacity: 0; -} - - - -/********** -* Axes -*/ -.nvd3 .nv-axis { - pointer-events:none; -} - -.nvd3 .nv-axis path { - fill: none; - stroke: #000; - stroke-opacity: .75; - shape-rendering: crispEdges; -} - -.nvd3 .nv-axis path.domain { - stroke-opacity: .75; -} - -.nvd3 .nv-axis.nv-x path.domain { - stroke-opacity: 0; -} - -.nvd3 .nv-axis line { - fill: none; - stroke: #e5e5e5; - shape-rendering: crispEdges; -} - -.nvd3 .nv-axis .zero line, -/*this selector may not be necessary*/ .nvd3 .nv-axis line.zero { - stroke-opacity: .75; -} - -.nvd3 .nv-axis .nv-axisMaxMin text { - font-weight: bold; -} - -.nvd3 .x .nv-axis .nv-axisMaxMin text, -.nvd3 .x2 .nv-axis .nv-axisMaxMin text, -.nvd3 .x3 .nv-axis .nv-axisMaxMin text { - text-anchor: middle -} - - - -/********** -* Brush -*/ - -.nv-brush .resize path { - fill: #eee; - stroke: #666; -} - - - -/********** -* Bars -*/ - -.nvd3 .nv-bars .negative rect { - zfill: brown; -} - -.nvd3 .nv-bars rect { - zfill: steelblue; - fill-opacity: .75; - - transition: fill-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear; -} - -.nvd3 .nv-bars rect.hover { - fill-opacity: 1; -} - -.nvd3 .nv-bars .hover rect { - fill: lightblue; -} - -.nvd3 .nv-bars text { - fill: rgba(0,0,0,0); -} - -.nvd3 .nv-bars .hover text { - fill: rgba(0,0,0,1); -} - - -/********** -* Bars -*/ - -.nvd3 .nv-multibar .nv-groups rect, -.nvd3 .nv-multibarHorizontal .nv-groups rect, -.nvd3 .nv-discretebar .nv-groups rect { - stroke-opacity: 0; - - transition: fill-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear; -} - -.nvd3 .nv-multibar .nv-groups rect:hover, -.nvd3 .nv-multibarHorizontal .nv-groups rect:hover, -.nvd3 .nv-discretebar .nv-groups rect:hover { - fill-opacity: 1; -} - -.nvd3 .nv-discretebar .nv-groups text, -.nvd3 .nv-multibarHorizontal .nv-groups text { - font-weight: bold; - fill: rgba(0,0,0,1); - stroke: rgba(0,0,0,0); -} - -/*********** -* Pie Chart -*/ - -.nvd3.nv-pie path { - stroke-opacity: 0; - transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; - -} - -.nvd3.nv-pie .nv-slice text { - stroke: #000; - stroke-width: 0; -} - -.nvd3.nv-pie path { - stroke: #fff; - stroke-width: 1px; - stroke-opacity: 1; -} - -.nvd3.nv-pie .hover path { - fill-opacity: .7; -} -.nvd3.nv-pie .nv-label { - pointer-events: none; -} -.nvd3.nv-pie .nv-label rect { - fill-opacity: 0; - stroke-opacity: 0; -} - -/********** -* Lines -*/ - -.nvd3 .nv-groups path.nv-line { - fill: none; - stroke-width: 1.5px; - /* - stroke-linecap: round; - shape-rendering: geometricPrecision; - - transition: stroke-width 250ms linear; - -moz-transition: stroke-width 250ms linear; - -webkit-transition: stroke-width 250ms linear; - - transition-delay: 250ms - -moz-transition-delay: 250ms; - -webkit-transition-delay: 250ms; - */ -} - -.nvd3 .nv-groups path.nv-line.nv-thin-line { - stroke-width: 1px; -} - - -.nvd3 .nv-groups path.nv-area { - stroke: none; - /* - stroke-linecap: round; - shape-rendering: geometricPrecision; - - stroke-width: 2.5px; - transition: stroke-width 250ms linear; - -moz-transition: stroke-width 250ms linear; - -webkit-transition: stroke-width 250ms linear; - - transition-delay: 250ms - -moz-transition-delay: 250ms; - -webkit-transition-delay: 250ms; - */ -} - -.nvd3 .nv-line.hover path { - stroke-width: 6px; -} - -/* -.nvd3.scatter .groups .point { - fill-opacity: 0.1; - stroke-opacity: 0.1; -} - */ - -.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { - fill-opacity: 0; - stroke-opacity: 0; -} - -.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point { - fill-opacity: .5 !important; - stroke-opacity: .5 !important; -} - - -.with-transitions .nvd3 .nv-groups .nv-point { - transition: stroke-width 250ms linear, stroke-opacity 250ms linear; - -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; - -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; - -} - -.nvd3.nv-scatter .nv-groups .nv-point.hover, -.nvd3 .nv-groups .nv-point.hover { - stroke-width: 7px; - fill-opacity: .95 !important; - stroke-opacity: .95 !important; -} - - -.nvd3 .nv-point-paths path { - stroke: #aaa; - stroke-opacity: 0; - fill: #eee; - fill-opacity: 0; -} - - - -.nvd3 .nv-indexLine { - cursor: ew-resize; -} - - -/********** -* Distribution -*/ - -.nvd3 .nv-distribution { - pointer-events: none; -} - - - -/********** -* Scatter -*/ - -/* **Attempting to remove this for useVoronoi(false), need to see if it's required anywhere -.nvd3 .nv-groups .nv-point { - pointer-events: none; -} -*/ - -.nvd3 .nv-groups .nv-point.hover { - stroke-width: 20px; - stroke-opacity: .5; -} - -.nvd3 .nv-scatter .nv-point.hover { - fill-opacity: 1; -} - -/* -.nv-group.hover .nv-point { - fill-opacity: 1; -} -*/ - - -/********** -* Stacked Area -*/ - -.nvd3.nv-stackedarea path.nv-area { - fill-opacity: .7; - /* - stroke-opacity: .65; - fill-opacity: 1; - */ - stroke-opacity: 0; - - transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; - - /* - transition-delay: 500ms; - -moz-transition-delay: 500ms; - -webkit-transition-delay: 500ms; - */ - -} - -.nvd3.nv-stackedarea path.nv-area.hover { - fill-opacity: .9; - /* - stroke-opacity: .85; - */ -} -/* -.d3stackedarea .groups path { - stroke-opacity: 0; -} - */ - - - -.nvd3.nv-stackedarea .nv-groups .nv-point { - stroke-opacity: 0; - fill-opacity: 0; -} - -/* -.nvd3.nv-stackedarea .nv-groups .nv-point.hover { - stroke-width: 20px; - stroke-opacity: .75; - fill-opacity: 1; -}*/ - - - -/********** -* Line Plus Bar -*/ - -.nvd3.nv-linePlusBar .nv-bar rect { - fill-opacity: .75; -} - -.nvd3.nv-linePlusBar .nv-bar rect:hover { - fill-opacity: 1; -} - - -/********** -* Bullet -*/ - -.nvd3.nv-bullet { font: 10px sans-serif; } -.nvd3.nv-bullet .nv-measure { fill-opacity: .8; } -.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; } -.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; } -.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; } -.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; } -.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; } -.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; } -.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; } -.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; } -.nvd3.nv-bullet .nv-subtitle { fill: #999; } - - -.nvd3.nv-bullet .nv-range { - fill: #bababa; - fill-opacity: .4; -} -.nvd3.nv-bullet .nv-range:hover { - fill-opacity: .7; -} - - - -/********** -* Sparkline -*/ - -.nvd3.nv-sparkline path { - fill: none; -} - -.nvd3.nv-sparklineplus g.nv-hoverValue { - pointer-events: none; -} - -.nvd3.nv-sparklineplus .nv-hoverValue line { - stroke: #333; - stroke-width: 1.5px; - } - -.nvd3.nv-sparklineplus, -.nvd3.nv-sparklineplus g { - pointer-events: all; -} - -.nvd3 .nv-hoverArea { - fill-opacity: 0; - stroke-opacity: 0; -} - -.nvd3.nv-sparklineplus .nv-xValue, -.nvd3.nv-sparklineplus .nv-yValue { - /* - stroke: #666; - */ - stroke-width: 0; - font-size: .9em; - font-weight: normal; -} - -.nvd3.nv-sparklineplus .nv-yValue { - stroke: #f66; -} - -.nvd3.nv-sparklineplus .nv-maxValue { - stroke: #2ca02c; - fill: #2ca02c; -} - -.nvd3.nv-sparklineplus .nv-minValue { - stroke: #d62728; - fill: #d62728; -} - -.nvd3.nv-sparklineplus .nv-currentValue { - /* - stroke: #444; - fill: #000; - */ - font-weight: bold; - font-size: 1.1em; -} - -/********** -* historical stock -*/ - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick { - stroke-width: 2px; -} - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover { - stroke-width: 4px; -} - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive { - stroke: #2ca02c; -} - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative { - stroke: #d62728; -} - -.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel { - font-weight: bold; -} - -.nvd3.nv-historicalStockChart .nv-dragTarget { - fill-opacity: 0; - stroke: none; - cursor: move; -} - -.nvd3 .nv-brush .extent { - /* - cursor: ew-resize !important; - */ - fill-opacity: 0 !important; -} - -.nvd3 .nv-brushBackground rect { - stroke: #000; - stroke-width: .4; - fill: #fff; - fill-opacity: .7; -} - - - -/********** -* Indented Tree -*/ - - -/** - * TODO: the following 3 selectors are based on classes used in the example. I should either make them standard and leave them here, or move to a CSS file not included in the library - */ -.nvd3.nv-indentedtree .name { - margin-left: 5px; -} - -.nvd3.nv-indentedtree .clickable { - color: #08C; - cursor: pointer; -} - -.nvd3.nv-indentedtree span.clickable:hover { - color: #005580; - text-decoration: underline; -} - - -.nvd3.nv-indentedtree .nv-childrenCount { - display: inline-block; - margin-left: 5px; -} - -.nvd3.nv-indentedtree .nv-treeicon { - cursor: pointer; - /* - cursor: n-resize; - */ -} - -.nvd3.nv-indentedtree .nv-treeicon.nv-folded { - cursor: pointer; - /* - cursor: s-resize; - */ -} - -/********** -* Parallel Coordinates -*/ - -.nvd3 .background path { - fill: none; - stroke: #ccc; - stroke-opacity: .4; - shape-rendering: crispEdges; -} - -.nvd3 .foreground path { - fill: none; - stroke: steelblue; - stroke-opacity: .7; -} - -.nvd3 .brush .extent { - fill-opacity: .3; - stroke: #fff; - shape-rendering: crispEdges; -} - -.nvd3 .axis line, .axis path { - fill: none; - stroke: #000; - shape-rendering: crispEdges; -} - -.nvd3 .axis text { - text-shadow: 0 1px 0 #fff; -} - -/**** -Interactive Layer -*/ -.nvd3 .nv-interactiveGuideLine { - pointer-events:none; -} -.nvd3 line.nv-guideline { - stroke: #ccc; -} \ No newline at end of file + text-align: right; + font-weight: bold; +} + +.nvtooltip table td.percent { + color: darkgray; +} + +.nvtooltip table tr.highlight td { + padding: 1px 9px 1px 0; + border-bottom-style: solid; + border-bottom-width: 1px; + border-top-style: solid; + border-top-width: 1px; +} + +.nvtooltip table td.legend-color-guide div { + width: 8px; + height: 8px; + vertical-align: middle; +} + +.nvtooltip table td.legend-color-guide div { + width: 12px; + height: 12px; + border: 1px solid #999; +} + +.nvtooltip .footer { + padding: 3px; + text-align: center; +} + +.nvtooltip-pending-removal { + pointer-events: none; + display: none; +} + + +/**** +Interactive Layer +*/ +.nvd3 .nv-interactiveGuideLine { + pointer-events:none; +} + +.nvd3 line.nv-guideline { + stroke: #ccc; +} diff --git a/admin/themes/default/js/vendor/nv.d3.min.js b/admin/themes/default/js/vendor/nv.d3.min.js index 24e1ffd5c..fb1fae5e6 100644 --- a/admin/themes/default/js/vendor/nv.d3.min.js +++ b/admin/themes/default/js/vendor/nv.d3.min.js @@ -1,6 +1,11 @@ -(function(){function t(e,t){return(new Date(t,e+1,0)).getDate()}function n(e,t,n){return function(r,i,s){var o=e(r),u=[];o1)while(op||r>d||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined||a){if(l&&d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined&&d3.event.relatedTarget.className.match(t.nvPointerEventsClass))return;u.elementMouseout({mouseX:n,mouseY:r}),c.renderGuideLine(null);return}var f=s.invert(n);u.elementMousemove({mouseX:n,mouseY:r,pointXValue:f}),d3.event.type==="dblclick"&&u.elementDblclick({mouseX:n,mouseY:r,pointXValue:f})}var h=d3.select(this),p=n||960,d=r||400,v=h.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([o]),m=v.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");m.append("g").attr("class","nv-interactiveGuideLine");if(!f)return;f.on("mousemove",g,!0).on("mouseout",g,!0).on("dblclick",g),c.renderGuideLine=function(t){if(!a)return;var n=v.select(".nv-interactiveGuideLine").selectAll("line").data(t!=null?[e.utils.NaNtoZero(t)]:[],String);n.enter().append("line").attr("class","nv-guideline").attr("x1",function(e){return e}).attr("x2",function(e){return e}).attr("y1",d).attr("y2",0),n.exit().remove()}})}var t=e.models.tooltip(),n=null,r=null,i={left:0,top:0},s=d3.scale.linear(),o=d3.scale.linear(),u=d3.dispatch("elementMousemove","elementMouseout","elementDblclick"),a=!0,f=null,l=navigator.userAgent.indexOf("MSIE")!==-1;return c.dispatch=u,c.tooltip=t,c.margin=function(e){return arguments.length?(i.top=typeof e.top!="undefined"?e.top:i.top,i.left=typeof e.left!="undefined"?e.left:i.left,c):i},c.width=function(e){return arguments.length?(n=e,c):n},c.height=function(e){return arguments.length?(r=e,c):r},c.xScale=function(e){return arguments.length?(s=e,c):s},c.showGuideLine=function(e){return arguments.length?(a=e,c):a},c.svgContainer=function(e){return arguments.length?(f=e,c):f},c},e.interactiveBisect=function(e,t,n){"use strict";if(!e instanceof Array)return null;typeof n!="function"&&(n=function(e,t){return e.x});var r=d3.bisector(n).left,i=d3.max([0,r(e,t)-1]),s=n(e[i],i);typeof s=="undefined"&&(s=i);if(s===t)return i;var o=d3.min([i+1,e.length-1]),u=n(e[o],o);return typeof u=="undefined"&&(u=o),Math.abs(u-t)>=Math.abs(s-t)?i:o},e.nearestValueIndex=function(e,t,n){"use strict";var r=Infinity,i=null;return e.forEach(function(e,s){var o=Math.abs(t-e);o<=r&&oT.height?0:x}v.top=Math.abs(x-S.top),v.left=Math.abs(E.left-S.left)}t+=a.offsetLeft+v.left-2*a.scrollLeft,u+=a.offsetTop+v.top-2*a.scrollTop}return s&&s>0&&(u=Math.floor(u/s)*s),e.tooltip.calcTooltipPosition([t,u],r,i,h),w}var t=null,n=null,r="w",i=50,s=25,o=null,u=null,a=null,f=null,l={left:null,top:null},c=!0,h="nvtooltip-"+Math.floor(Math.random()*1e5),p="nv-pointer-events-none",d=function(e,t){return e},v=function(e){return e},m=function(e){if(t!=null)return t;if(e==null)return"";var n=d3.select(document.createElement("table")),r=n.selectAll("thead").data([e]).enter().append("thead");r.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(v(e.value));var i=n.selectAll("tbody").data([e]).enter().append("tbody"),s=i.selectAll("tr").data(function(e){return e.series}).enter().append("tr").classed("highlight",function(e){return e.highlight});s.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(e){return e.color}),s.append("td").classed("key",!0).html(function(e){return e.key}),s.append("td").classed("value",!0).html(function(e,t){return d(e.value,t)}),s.selectAll("td").each(function(e){if(e.highlight){var t=d3.scale.linear().domain([0,1]).range(["#fff",e.color]),n=.6;d3.select(this).style("border-bottom-color",t(n)).style("border-top-color",t(n))}});var o=n.node().outerHTML;return e.footer!==undefined&&(o+=""),o},g=function(e){return e&&e.series&&e.series.length>0?!0:!1};return w.nvPointerEventsClass=p,w.content=function(e){return arguments.length?(t=e,w):t},w.tooltipElem=function(){return f},w.contentGenerator=function(e){return arguments.length?(typeof e=="function"&&(m=e),w):m},w.data=function(e){return arguments.length?(n=e,w):n},w.gravity=function(e){return arguments.length?(r=e,w):r},w.distance=function(e){return arguments.length?(i=e,w):i},w.snapDistance=function(e){return arguments.length?(s=e,w):s},w.classes=function(e){return arguments.length?(u=e,w):u},w.chartContainer=function(e){return arguments.length?(a=e,w):a},w.position=function(e){return arguments.length?(l.left=typeof e.left!="undefined"?e.left:l.left,l.top=typeof e.top!="undefined"?e.top:l.top,w):l},w.fixedTop=function(e){return arguments.length?(o=e,w):o},w.enabled=function(e){return arguments.length?(c=e,w):c},w.valueFormatter=function(e){return arguments.length?(typeof e=="function"&&(d=e),w):d},w.headerFormatter=function(e){return arguments.length?(typeof e=="function"&&(v=e),w):v},w.id=function(){return h},w},e.tooltip.show=function(t,n,r,i,s,o){var u=document.createElement("div");u.className="nvtooltip "+(o?o:"xy-tooltip");var a=s;if(!s||s.tagName.match(/g|svg/i))a=document.getElementsByTagName("body")[0];u.style.left=0,u.style.top=0,u.style.opacity=0,u.innerHTML=n,a.appendChild(u),s&&(t[0]=t[0]-s.scrollLeft,t[1]=t[1]-s.scrollTop),e.tooltip.calcTooltipPosition(t,r,i,u)},e.tooltip.findFirstNonSVGParent=function(e){while(e.tagName.match(/^g|svg$/i)!==null)e=e.parentNode;return e},e.tooltip.findTotalOffsetTop=function(e,t){var n=t;do isNaN(e.offsetTop)||(n+=e.offsetTop);while(e=e.offsetParent);return n},e.tooltip.findTotalOffsetLeft=function(e,t){var n=t;do isNaN(e.offsetLeft)||(n+=e.offsetLeft);while(e=e.offsetParent);return n},e.tooltip.calcTooltipPosition=function(t,n,r,i){var s=parseInt(i.offsetHeight),o=parseInt(i.offsetWidth),u=e.utils.windowSize().width,a=e.utils.windowSize().height,f=window.pageYOffset,l=window.pageXOffset,c,h;a=window.innerWidth>=document.body.scrollWidth?a:a-16,u=window.innerHeight>=document.body.scrollHeight?u:u-16,n=n||"s",r=r||20;var p=function(t){return e.tooltip.findTotalOffsetTop(t,h)},d=function(t){return e.tooltip.findTotalOffsetLeft(t,c)};switch(n){case"e":c=t[0]-o-r,h=t[1]-s/2;var v=d(i),m=p(i);vl?t[0]+r:l-v+c),mf+a&&(h=f+a-m+h-s);break;case"w":c=t[0]+r,h=t[1]-s/2;var v=d(i),m=p(i);v+o>u&&(c=t[0]-o-r),mf+a&&(h=f+a-m+h-s);break;case"n":c=t[0]-o/2-5,h=t[1]+r;var v=d(i),m=p(i);vu&&(c=c-o/2+5),m+s>f+a&&(h=f+a-m+h-s);break;case"s":c=t[0]-o/2,h=t[1]-s-r;var v=d(i),m=p(i);vu&&(c=c-o/2+5),f>m&&(h=f);break;case"none":c=t[0],h=t[1]-r;var v=d(i),m=p(i)}return i.style.left=c+"px",i.style.top=h+"px",i.style.opacity=1,i.style.position="absolute",i},e.tooltip.cleanup=function(){var e=document.getElementsByClassName("nvtooltip"),t=[];while(e.length)t.push(e[0]),e[0].style.transitionDelay="0 !important",e[0].style.opacity=0,e[0].className="nvtooltip-pending-removal";setTimeout(function(){while(t.length){var e=t.pop();e.parentNode.removeChild(e)}},500)}}(),e.utils.windowSize=function(){var e={width:640,height:480};return document.body&&document.body.offsetWidth&&(e.width=document.body.offsetWidth,e.height=document.body.offsetHeight),document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth&&(e.width=document.documentElement.offsetWidth,e.height=document.documentElement.offsetHeight),window.innerWidth&&window.innerHeight&&(e.width=window.innerWidth,e.height=window.innerHeight),e},e.utils.windowResize=function(e){if(e===undefined)return;var t=window.onresize;window.onresize=function(n){typeof t=="function"&&t(n),e(n)}},e.utils.getColor=function(t){return arguments.length?Object.prototype.toString.call(t)==="[object Array]"?function(e,n){return e.color||t[n%t.length]}:t:e.utils.defaultColor()},e.utils.defaultColor=function(){var e=d3.scale.category20().range();return function(t,n){return t.color||e[n%e.length]}},e.utils.customTheme=function(e,t,n){t=t||function(e){return e.key},n=n||d3.scale.category20().range();var r=n.length;return function(i,s){var o=t(i);return r||(r=n.length),typeof e[o]!="undefined"?typeof e[o]=="function"?e[o]():e[o]:n[--r]}},e.utils.pjax=function(t,n){function r(r){d3.html(r,function(r){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(r).select(n).node(),i),e.utils.pjax(t,n)})}d3.selectAll(t).on("click",function(){history.pushState(this.href,this.textContent,this.href),r(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&r(d3.event.state)})},e.utils.calcApproxTextWidth=function(e){if(typeof e.style=="function"&&typeof e.text=="function"){var t=parseInt(e.style("font-size").replace("px","")),n=e.text().length;return n*t*.5}return 0},e.utils.NaNtoZero=function(e){return typeof e!="number"||isNaN(e)||e===null||e===Infinity?0:e},e.utils.optionsFunc=function(e){return e&&d3.map(e).forEach(function(e,t){typeof this[e]=="function"&&this[e](t)}.bind(this)),this},e.models.axis=function(){"use strict";function m(e){return e.each(function(e){var i=d3.select(this),m=i.selectAll("g.nv-wrap.nv-axis").data([e]),g=m.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),y=g.append("g"),b=m.select("g");p!==null?t.ticks(p):(t.orient()=="top"||t.orient()=="bottom")&&t.ticks(Math.abs(s.range()[1]-s.range()[0])/100),b.transition().call(t),v=v||t.scale();var w=t.tickFormat();w==null&&(w=v.tickFormat());var E=b.selectAll("text.nv-axislabel").data([o||null]);E.exit().remove();switch(t.orient()){case"top":E.enter().append("text").attr("class","nv-axislabel");var S=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);E.attr("text-anchor","middle").attr("y",0).attr("x",S/2);if(u){var x=m.selectAll("g.nv-axisMaxMin").data(s.domain());x.enter().append("g").attr("class","nv-axisMaxMin").append("text"),x.exit().remove(),x.attr("transform",function(e,t){return"translate("+s(e)+",0)"}).select("text").attr("dy","-0.5em").attr("y",-t.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=w(e);return(""+n).match("NaN")?"":n}),x.transition().attr("transform",function(e,t){return"translate("+s.range()[t]+",0)"})}break;case"bottom":var T=36,N=30,C=b.selectAll("g").select("text");if(f%360){C.each(function(e,t){var n=this.getBBox().width;n>N&&(N=n)});var k=Math.abs(Math.sin(f*Math.PI/180)),T=(k?k*N:N)+30;C.attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f%360>0?"start":"end")}E.enter().append("text").attr("class","nv-axislabel");var S=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);E.attr("text-anchor","middle").attr("y",T).attr("x",S/2);if(u){var x=m.selectAll("g.nv-axisMaxMin").data([s.domain()[0],s.domain()[s.domain().length-1]]);x.enter().append("g").attr("class","nv-axisMaxMin").append("text"),x.exit().remove(),x.attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",t.tickPadding()).attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f?f%360>0?"start":"end":"middle").text(function(e,t){var n=w(e);return(""+n).match("NaN")?"":n}),x.transition().attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"})}c&&C.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":E.enter().append("text").attr("class","nv-axislabel"),E.style("text-anchor",l?"middle":"begin").attr("transform",l?"rotate(90)":"").attr("y",l?-Math.max(n.right,r)+12:-10).attr("x",l?s.range()[0]/2:t.tickPadding());if(u){var x=m.selectAll("g.nv-axisMaxMin").data(s.domain());x.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(e,t){return"translate(0,"+s(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",t.tickPadding()).style("text-anchor","start").text(function(e,t){var n=w(e);return(""+n).match("NaN")?"":n}),x.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":E.enter().append("text").attr("class","nv-axislabel"),E.style("text-anchor",l?"middle":"end").attr("transform",l?"rotate(-90)":"").attr("y",l?-Math.max(n.left,r)+d:-10).attr("x",l?-s.range()[0]/2:-t.tickPadding());if(u){var x=m.selectAll("g.nv-axisMaxMin").data(s.domain());x.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(e,t){return"translate(0,"+v(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-t.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=w(e);return(""+n).match("NaN")?"":n}),x.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}}E.text(function(e){return e}),u&&(t.orient()==="left"||t.orient()==="right")&&(b.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);if(s(e)s.range()[0]-10)(e>1e-10||e<-1e-10)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0)}),s.domain()[0]==s.domain()[1]&&s.domain()[0]==0&&m.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return t?0:1}));if(u&&(t.orient()==="top"||t.orient()==="bottom")){var L=[];m.selectAll("g.nv-axisMaxMin").each(function(e,t){try{t?L.push(s(e)-this.getBBox().width-4):L.push(s(e)+this.getBBox().width+4)}catch(n){t?L.push(s(e)-4):L.push(s(e)+4)}}),b.selectAll("g").each(function(e,t){if(s(e)L[1])e>1e-10||e<-1e-10?d3.select(this).remove():d3.select(this).select("text").remove()})}a&&b.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",!0),v=s.copy()}),m}var t=d3.svg.axis(),n={top:0,right:0,bottom:0,left:0},r=75,i=60,s=d3.scale.linear(),o=null,u=!0,a=!0,f=0,l=!0,c=!1,h=!1,p=null,d=12;t.scale(s).orient("bottom").tickFormat(function(e){return e});var v;return m.axis=t,d3.rebind(m,t,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(m,s,"domain","range","rangeBand","rangeBands"),m.options=e.utils.optionsFunc.bind(m),m.margin=function(e){return arguments.length?(n.top=typeof e.top!="undefined"?e.top:n.top,n.right=typeof e.right!="undefined"?e.right:n.right,n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom,n.left=typeof e.left!="undefined"?e.left:n.left,m):n},m.width=function(e){return arguments.length?(r=e,m):r},m.ticks=function(e){return arguments.length?(p=e,m):p},m.height=function(e){return arguments.length?(i=e,m):i},m.axisLabel=function(e){return arguments.length?(o=e,m):o},m.showMaxMin=function(e){return arguments.length?(u=e,m):u},m.highlightZero=function(e){return arguments.length?(a=e,m):a},m.scale=function(e){return arguments.length?(s=e,t.scale(s),h=typeof s.rangeBands=="function",d3.rebind(m,s,"domain","range","rangeBand","rangeBands"),m):s},m.rotateYLabel=function(e){return arguments.length?(l=e,m):l},m.rotateLabels=function(e){return arguments.length?(f=e,m):f},m.staggerLabels=function(e){return arguments.length?(c=e,m):c},m.axisLabelDistance=function(e){return arguments.length?(d=e,m):d},m},e.models.bullet=function(){"use strict";function m(e){return e.each(function(e,n){var p=c-t.left-t.right,m=h-t.top-t.bottom,g=d3.select(this),y=i.call(this,e,n).slice().sort(d3.descending),b=s.call(this,e,n).slice().sort(d3.descending),w=o.call(this,e,n).slice().sort(d3.descending),E=u.call(this,e,n).slice(),S=a.call(this,e,n).slice(),x=f.call(this,e,n).slice(),T=d3.scale.linear().domain(d3.extent(d3.merge([l,y]))).range(r?[p,0]:[0,p]),N=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(T.range());this.__chart__=T;var C=d3.min(y),k=d3.max(y),L=y[1],A=g.selectAll("g.nv-wrap.nv-bullet").data([e]),O=A.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),M=O.append("g"),_=A.select("g");M.append("rect").attr("class","nv-range nv-rangeMax"),M.append("rect").attr("class","nv-range nv-rangeAvg"),M.append("rect").attr("class","nv-range nv-rangeMin"),M.append("rect").attr("class","nv-measure"),M.append("path").attr("class","nv-markerTriangle"),A.attr("transform","translate("+t.left+","+t.top+")");var D=function(e){return Math.abs(N(e)-N(0))},P=function(e){return Math.abs(T(e)-T(0))},H=function(e){return e<0?N(e):N(0)},B=function(e){return e<0?T(e):T(0)};_.select("rect.nv-rangeMax").attr("height",m).attr("width",P(k>0?k:C)).attr("x",B(k>0?k:C)).datum(k>0?k:C),_.select("rect.nv-rangeAvg").attr("height",m).attr("width",P(L)).attr("x",B(L)).datum(L),_.select("rect.nv-rangeMin").attr("height",m).attr("width",P(k)).attr("x",B(k)).attr("width",P(k>0?C:k)).attr("x",B(k>0?C:k)).datum(k>0?C:k),_.select("rect.nv-measure").style("fill",d).attr("height",m/3).attr("y",m/3).attr("width",w<0?T(0)-T(w[0]):T(w[0])-T(0)).attr("x",B(w)).on("mouseover",function(){v.elementMouseover({value:w[0],label:x[0]||"Current",pos:[T(w[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:w[0],label:x[0]||"Current"})});var j=m/6;b[0]?_.selectAll("path.nv-markerTriangle").attr("transform",function(e){return"translate("+T(b[0])+","+m/2+")"}).attr("d","M0,"+j+"L"+j+","+ -j+" "+ -j+","+ -j+"Z").on("mouseover",function(){v.elementMouseover({value:b[0],label:S[0]||"Previous",pos:[T(b[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:b[0],label:S[0]||"Previous"})}):_.selectAll("path.nv-markerTriangle").remove(),A.selectAll(".nv-range").on("mouseover",function(e,t){var n=E[t]||(t?t==1?"Mean":"Minimum":"Maximum");v.elementMouseover({value:e,label:n,pos:[T(e),m/2]})}).on("mouseout",function(e,t){var n=E[t]||(t?t==1?"Mean":"Minimum":"Maximum");v.elementMouseout({value:e,label:n})})}),m}var t={top:0,right:0,bottom:0,left:0},n="left",r=!1,i=function(e){return e.ranges},s=function(e){return e.markers},o=function(e){return e.measures},u=function(e){return e.rangeLabels?e.rangeLabels:[]},a=function(e){return e.markerLabels?e.markerLabels:[]},f=function(e){return e.measureLabels?e.measureLabels:[]},l=[0],c=380,h=30,p=null,d=e.utils.getColor(["#1f77b4"]),v=d3.dispatch("elementMouseover","elementMouseout");return m.dispatch=v,m.options=e.utils.optionsFunc.bind(m),m.orient=function(e){return arguments.length?(n=e,r=n=="right"||n=="bottom",m):n},m.ranges=function(e){return arguments.length?(i=e,m):i},m.markers=function(e){return arguments.length?(s=e,m):s},m.measures=function(e){return arguments.length?(o=e,m):o},m.forceX=function(e){return arguments.length?(l=e,m):l},m.width=function(e){return arguments.length?(c=e,m):c},m.height=function(e){return arguments.length?(h=e,m):h},m.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,m):t},m.tickFormat=function(e){return arguments.length?(p=e,m):p},m.color=function(t){return arguments.length?(d=e.utils.getColor(t),m):d},m},e.models.bulletChart=function(){"use strict";function m(e){return e.each(function(n,h){var g=d3.select(this),y=(a||parseInt(g.style("width"))||960)-i.left-i.right,b=f-i.top-i.bottom,w=this;m.update=function(){m(e)},m.container=this;if(!n||!s.call(this,n,h)){var E=g.selectAll(".nv-noData").data([p]);return E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),E.attr("x",i.left+y/2).attr("y",18+i.top+b/2).text(function(e){return e}),m}g.selectAll(".nv-noData").remove();var S=s.call(this,n,h).slice().sort(d3.descending),x=o.call(this,n,h).slice().sort(d3.descending),T=u.call(this,n,h).slice().sort(d3.descending),N=g.selectAll("g.nv-wrap.nv-bulletChart").data([n]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),k=C.append("g"),L=N.select("g");k.append("g").attr("class","nv-bulletWrap"),k.append("g").attr("class","nv-titles"),N.attr("transform","translate("+i.left+","+i.top+")");var A=d3.scale.linear().domain([0,Math.max(S[0],x[0],T[0])]).range(r?[y,0]:[0,y]),O=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(A.range());this.__chart__=A;var M=function(e){return Math.abs(O(e)-O(0))},_=function(e){return Math.abs(A(e)-A(0))},D=k.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(f-i.top-i.bottom)/2+")");D.append("text").attr("class","nv-title").text(function(e){return e.title}),D.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(e){return e.subtitle}),t.width(y).height(b);var P=L.select(".nv-bulletWrap");d3.transition(P).call(t);var H=l||A.tickFormat(y/100),B=L.selectAll("g.nv-tick").data(A.ticks(y/50),function(e){return this.textContent||H(e)}),j=B.enter().append("g").attr("class","nv-tick").attr("transform",function(e){return"translate("+O(e)+",0)"}).style("opacity",1e-6);j.append("line").attr("y1",b).attr("y2",b*7/6),j.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",b*7/6).text(H);var F=d3.transition(B).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1);F.select("line").attr("y1",b).attr("y2",b*7/6),F.select("text").attr("y",b*7/6),d3.transition(B.exit()).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1e-6).remove(),d.on("tooltipShow",function(e){e.key=n.title,c&&v(e,w.parentNode)})}),d3.timer.flush(),m}var t=e.models.bullet(),n="left",r=!1,i={top:5,right:40,bottom:20,left:120},s=function(e){return e.ranges},o=function(e){return e.markers},u=function(e){return e.measures},a=null,f=55,l=null,c=!0,h=function(e,t,n,r,i){return"

"+t+"

"+"

"+n+"

"},p="No Data Available.",d=d3.dispatch("tooltipShow","tooltipHide"),v=function(t,n){var r=t.pos[0]+(n.offsetLeft||0)+i.left,s=t.pos[1]+(n.offsetTop||0)+i.top,o=h(t.key,t.label,t.value,t,m);e.tooltip.show([r,s],o,t.value<0?"e":"w",null,n)};return t.dispatch.on("elementMouseover.tooltip",function(e){d.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){d.tooltipHide(e)}),d.on("tooltipHide",function(){c&&e.tooltip.cleanup()}),m.dispatch=d,m.bullet=t,d3.rebind(m,t,"color"),m.options=e.utils.optionsFunc.bind(m),m.orient=function(e){return arguments.length?(n=e,r=n=="right"||n=="bottom",m):n},m.ranges=function(e){return arguments.length?(s=e,m):s},m.markers=function(e){return arguments.length?(o=e,m):o},m.measures=function(e){return arguments.length?(u=e,m):u},m.width=function(e){return arguments.length?(a=e,m):a},m.height=function(e){return arguments.length?(f=e,m):f},m.margin=function(e){return arguments.length?(i.top=typeof e.top!="undefined"?e.top:i.top,i.right=typeof e.right!="undefined"?e.right:i.right,i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom,i.left=typeof e.left!="undefined"?e.left:i.left,m):i},m.tickFormat=function(e){return arguments.length?(l=e,m):l},m.tooltips=function(e){return arguments.length?(c=e,m):c},m.tooltipContent=function(e){return arguments.length?(h=e,m):h},m.noData=function(e){return arguments.length?(p=e,m):p},m},e.models.cumulativeLineChart=function(){"use strict";function D(b){return b.each(function(b){function q(e,t){d3.select(D.container).style("cursor","ew-resize")}function R(e,t){M.x=d3.event.x,M.i=Math.round(O.invert(M.x)),rt()}function U(e,t){d3.select(D.container).style("cursor","auto"),x.index=M.i,k.stateChange(x)}function rt(){nt.data([M]);var e=D.transitionDuration();D.transitionDuration(0),D.update(),D.transitionDuration(e)}var A=d3.select(this).classed("nv-chart-"+S,!0),H=this,B=(f||parseInt(A.style("width"))||960)-u.left-u.right,j=(l||parseInt(A.style("height"))||400)-u.top-u.bottom;D.update=function(){A.transition().duration(L).call(D)},D.container=this,x.disabled=b.map(function(e){return!!e.disabled});if(!T){var F;T={};for(F in x)x[F]instanceof Array?T[F]=x[F].slice(0):T[F]=x[F]}var I=d3.behavior.drag().on("dragstart",q).on("drag",R).on("dragend",U);if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var z=A.selectAll(".nv-noData").data([N]);return z.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),z.attr("x",u.left+B/2).attr("y",u.top+j/2).text(function(e){return e}),D}A.selectAll(".nv-noData").remove(),w=t.xScale(),E=t.yScale();if(!y){var W=b.filter(function(e){return!e.disabled}).map(function(e,n){var r=d3.extent(e.values,t.y());return r[0]<-0.95&&(r[0]=-0.95),[(r[0]-r[1])/(1+r[1]),(r[1]-r[0])/(1+r[0])]}),X=[d3.min(W,function(e){return e[0]}),d3.max(W,function(e){return e[1]})];t.yDomain(X)}else t.yDomain(null);O.domain([0,b[0].values.length-1]).range([0,B]).clamp(!0);var b=P(M.i,b),V=g?"none":"all",$=A.selectAll("g.nv-wrap.nv-cumulativeLine").data([b]),J=$.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),K=$.select("g");J.append("g").attr("class","nv-interactive"),J.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),J.append("g").attr("class","nv-y nv-axis"),J.append("g").attr("class","nv-background"),J.append("g").attr("class","nv-linesWrap").style("pointer-events",V),J.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),J.append("g").attr("class","nv-legendWrap"),J.append("g").attr("class","nv-controlsWrap"),c&&(i.width(B),K.select(".nv-legendWrap").datum(b).call(i),u.top!=i.height()&&(u.top=i.height(),j=(l||parseInt(A.style("height"))||400)-u.top-u.bottom),K.select(".nv-legendWrap").attr("transform","translate(0,"+ -u.top+")"));if(m){var Q=[{key:"Re-scale y-axis",disabled:!y}];s.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),K.select(".nv-controlsWrap").datum(Q).attr("transform","translate(0,"+ -u.top+")").call(s)}$.attr("transform","translate("+u.left+","+u.top+")"),d&&K.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)");var G=b.filter(function(e){return e.tempDisabled});$.select(".tempDisabled").remove(),G.length&&$.append("text").attr("class","tempDisabled").attr("x",B/2).attr("y","-.71em").style("text-anchor","end").text(G.map(function(e){return e.key}).join(", ")+" values cannot be calculated for this time period."),g&&(o.width(B).height(j).margin({left:u.left,top:u.top}).svgContainer(A).xScale(w),$.select(".nv-interactive").call(o)),J.select(".nv-background").append("rect"),K.select(".nv-background rect").attr("width",B).attr("height",j),t.y(function(e){return e.display.y}).width(B).height(j).color(b.map(function(e,t){return e.color||a(e,t)}).filter(function(e,t){return!b[t].disabled&&!b[t].tempDisabled}));var Y=K.select(".nv-linesWrap").datum(b.filter(function(e){return!e.disabled&&!e.tempDisabled}));Y.call(t),b.forEach(function(e,t){e.seriesIndex=t});var Z=b.filter(function(e){return!e.disabled&&!!C(e)}),et=K.select(".nv-avgLinesWrap").selectAll("line").data(Z,function(e){return e.key}),tt=function(e){var t=E(C(e));return t<0?0:t>j?j:t};et.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(e,n){return t.color()(e,e.seriesIndex)}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt),et.style("stroke-opacity",function(e){var t=E(C(e));return t<0||t>j?0:1}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt),et.exit().remove();var nt=Y.selectAll(".nv-indexLine").data([M]);nt.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(I),nt.attr("transform",function(e){return"translate("+O(e.i)+",0)"}).attr("height",j),h&&(n.scale(w).ticks(Math.min(b[0].values.length,B/70)).tickSize(-j,0),K.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")"),d3.transition(K.select(".nv-x.nv-axis")).call(n)),p&&(r.scale(E).ticks(j/36).tickSize(-B,0),d3.transition(K.select(".nv-y.nv-axis")).call(r)),K.select(".nv-background rect").on("click",function(){M.x=d3.mouse(this)[0],M.i=Math.round(O.invert(M.x)),x.index=M.i,k.stateChange(x),rt()}),t.dispatch.on("elementClick",function(e){M.i=e.pointIndex,M.x=O(M.i),x.index=M.i,k.stateChange(x),rt()}),s.dispatch.on("legendClick",function(e,t){e.disabled=!e.disabled,y=!e.disabled,x.rescaleY=y,k.stateChange(x),D.update()}),i.dispatch.on("stateChange",function(e){x.disabled=e.disabled,k.stateChange(x),D.update()}),o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,f,l,c=[];b.filter(function(e,t){return e.seriesIndex=t,!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,D.x()),t.highlightPoint(r,f,!0);var o=n.values[f];if(typeof o=="undefined")return;typeof s=="undefined"&&(s=o),typeof l=="undefined"&&(l=D.xScale()(D.x()(o,f))),c.push({key:n.key,value:D.y()(o,f),color:a(n,n.seriesIndex)})});if(c.length>2){var h=D.yScale().invert(i.mouseY),p=Math.abs(D.yScale().domain()[0]-D.yScale().domain()[1]),d=.03*p,m=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);m!==null&&(c[m].highlight=!0)}var g=n.tickFormat()(D.x()(s,f),f);o.tooltip.position({left:l+u.left,top:i.mouseY+u.top}).chartContainer(H.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:g,series:c})(),o.renderGuideLine(l)}),o.dispatch.on("elementMouseout",function(e){k.tooltipHide(),t.clearHighlights()}),k.on("tooltipShow",function(e){v&&_(e,H.parentNode)}),k.on("changeState",function(e){typeof e.disabled!="undefined"&&(b.forEach(function(t,n){t.disabled=e.disabled[n]}),x.disabled=e.disabled),typeof e.index!="undefined"&&(M.i=e.index,M.x=O(M.i),x.index=e.index,nt.data([M])),typeof e.rescaleY!="undefined"&&(y=e.rescaleY),D.update()})}),D}function P(e,n){return n.map(function(n,r){if(!n.values)return n;var i=t.y()(n.values[e],e);return i<-0.95&&!A?(n.tempDisabled=!0,n):(n.tempDisabled=!1,n.values= -n.values.map(function(e,n){return e.display={y:(t.y()(e,n)-i)/(1+i)},e}),n)})}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline(),u={top:30,right:30,bottom:50,left:60},a=e.utils.defaultColor(),f=null,l=null,c=!0,h=!0,p=!0,d=!1,v=!0,m=!0,g=!1,y=!0,b=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" at "+t+"

"},w,E,S=t.id(),x={index:0,rescaleY:y},T=null,N="No Data Available.",C=function(e){return e.average},k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250,A=!1;n.orient("bottom").tickPadding(7),r.orient(d?"right":"left"),s.updateState(!1);var O=d3.scale.linear(),M={i:0,x:0},_=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,D);e.tooltip.show([o,u],l,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],k.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)}),k.on("tooltipHide",function(){v&&e.tooltip.cleanup()}),D.dispatch=k,D.lines=t,D.legend=i,D.xAxis=n,D.yAxis=r,D.interactiveLayer=o,d3.rebind(D,t,"defined","isArea","x","y","xScale","yScale","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id"),D.options=e.utils.optionsFunc.bind(D),D.margin=function(e){return arguments.length?(u.top=typeof e.top!="undefined"?e.top:u.top,u.right=typeof e.right!="undefined"?e.right:u.right,u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom,u.left=typeof e.left!="undefined"?e.left:u.left,D):u},D.width=function(e){return arguments.length?(f=e,D):f},D.height=function(e){return arguments.length?(l=e,D):l},D.color=function(t){return arguments.length?(a=e.utils.getColor(t),i.color(a),D):a},D.rescaleY=function(e){return arguments.length?(y=e,D):y},D.showControls=function(e){return arguments.length?(m=e,D):m},D.useInteractiveGuideline=function(e){return arguments.length?(g=e,e===!0&&(D.interactive(!1),D.useVoronoi(!1)),D):g},D.showLegend=function(e){return arguments.length?(c=e,D):c},D.showXAxis=function(e){return arguments.length?(h=e,D):h},D.showYAxis=function(e){return arguments.length?(p=e,D):p},D.rightAlignYAxis=function(e){return arguments.length?(d=e,r.orient(e?"right":"left"),D):d},D.tooltips=function(e){return arguments.length?(v=e,D):v},D.tooltipContent=function(e){return arguments.length?(b=e,D):b},D.state=function(e){return arguments.length?(x=e,D):x},D.defaultState=function(e){return arguments.length?(T=e,D):T},D.noData=function(e){return arguments.length?(N=e,D):N},D.average=function(e){return arguments.length?(C=e,D):C},D.transitionDuration=function(e){return arguments.length?(L=e,D):L},D.noErrorCheck=function(e){return arguments.length?(A=e,D):A},D},e.models.discreteBar=function(){"use strict";function E(e){return e.each(function(e){var i=n-t.left-t.right,E=r-t.top-t.bottom,S=d3.select(this);e.forEach(function(e,t){e.values.forEach(function(e){e.series=t})});var T=p&&d?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0}})});s.domain(p||d3.merge(T).map(function(e){return e.x})).rangeBands(v||[0,i],.1),o.domain(d||d3.extent(d3.merge(T).map(function(e){return e.y}).concat(f))),c?o.range(m||[E-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]):o.range(m||[E,0]),b=b||s,w=w||o.copy().range([o(0),o(0)]);var N=S.selectAll("g.nv-wrap.nv-discretebar").data([e]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),k=C.append("g"),L=N.select("g");k.append("g").attr("class","nv-groups"),N.attr("transform","translate("+t.left+","+t.top+")");var A=N.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),A.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),A.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}),A.transition().style("stroke-opacity",1).style("fill-opacity",.75);var O=A.selectAll("g.nv-bar").data(function(e){return e.values});O.exit().remove();var M=O.enter().append("g").attr("transform",function(e,t,n){return"translate("+(s(u(e,t))+s.rangeBand()*.05)+", "+o(0)+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),g.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),g.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){g.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(t,n){g.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()});M.append("rect").attr("height",0).attr("width",s.rangeBand()*.9/e.length),c?(M.append("text").attr("text-anchor","middle"),O.select("text").text(function(e,t){return h(a(e,t))}).transition().attr("x",s.rangeBand()*.9/2).attr("y",function(e,t){return a(e,t)<0?o(a(e,t))-o(0)+12:-4})):O.selectAll("text").remove(),O.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(e,t){return e.color||l(e,t)}).style("stroke",function(e,t){return e.color||l(e,t)}).select("rect").attr("class",y).transition().attr("width",s.rangeBand()*.9/e.length),O.transition().attr("transform",function(e,t){var n=s(u(e,t))+s.rangeBand()*.05,r=a(e,t)<0?o(0):o(0)-o(a(e,t))<1?o(0)-1:o(a(e,t));return"translate("+n+", "+r+")"}).select("rect").attr("height",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(d&&d[0]||0))||1)}),b=s.copy(),w=o.copy()}),E}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=!1,h=d3.format(",.2f"),p,d,v,m,g=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),y="discreteBar",b,w;return E.dispatch=g,E.options=e.utils.optionsFunc.bind(E),E.x=function(e){return arguments.length?(u=e,E):u},E.y=function(e){return arguments.length?(a=e,E):a},E.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,E):t},E.width=function(e){return arguments.length?(n=e,E):n},E.height=function(e){return arguments.length?(r=e,E):r},E.xScale=function(e){return arguments.length?(s=e,E):s},E.yScale=function(e){return arguments.length?(o=e,E):o},E.xDomain=function(e){return arguments.length?(p=e,E):p},E.yDomain=function(e){return arguments.length?(d=e,E):d},E.xRange=function(e){return arguments.length?(v=e,E):v},E.yRange=function(e){return arguments.length?(m=e,E):m},E.forceY=function(e){return arguments.length?(f=e,E):f},E.color=function(t){return arguments.length?(l=e.utils.getColor(t),E):l},E.id=function(e){return arguments.length?(i=e,E):i},E.showValues=function(e){return arguments.length?(c=e,E):c},E.valueFormat=function(e){return arguments.length?(h=e,E):h},E.rectClass=function(e){return arguments.length?(y=e,E):y},E},e.models.discreteBarChart=function(){"use strict";function w(e){return e.each(function(e){var u=d3.select(this),p=this,E=(s||parseInt(u.style("width"))||960)-i.left-i.right,S=(o||parseInt(u.style("height"))||400)-i.top-i.bottom;w.update=function(){g.beforeUpdate(),u.transition().duration(y).call(w)},w.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var T=u.selectAll(".nv-noData").data([m]);return T.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),T.attr("x",i.left+E/2).attr("y",i.top+S/2).text(function(e){return e}),w}u.selectAll(".nv-noData").remove(),d=t.xScale(),v=t.yScale().clamp(!0);var N=u.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([e]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),k=C.append("defs"),L=N.select("g");C.append("g").attr("class","nv-x nv-axis"),C.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),C.append("g").attr("class","nv-barsWrap"),L.attr("transform","translate("+i.left+","+i.top+")"),l&&L.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)"),t.width(E).height(S);var A=L.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));A.transition().call(t),k.append("clipPath").attr("id","nv-x-label-clip-"+t.id()).append("rect"),L.select("#nv-x-label-clip-"+t.id()+" rect").attr("width",d.rangeBand()*(c?2:1)).attr("height",16).attr("x",-d.rangeBand()/(c?1:2));if(a){n.scale(d).ticks(E/100).tickSize(-S,0),L.select(".nv-x.nv-axis").attr("transform","translate(0,"+(v.range()[0]+(t.showValues()&&v.domain()[0]<0?16:0))+")"),L.select(".nv-x.nv-axis").transition().call(n);var O=L.select(".nv-x.nv-axis").selectAll("g");c&&O.selectAll("text").attr("transform",function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"})}f&&(r.scale(v).ticks(S/36).tickSize(-E,0),L.select(".nv-y.nv-axis").transition().call(r)),L.select(".nv-zeroLine line").attr("x1",0).attr("x2",E).attr("y1",v(0)).attr("y2",v(0)),g.on("tooltipShow",function(e){h&&b(e,p.parentNode)})}),w}var t=e.models.discreteBar(),n=e.models.axis(),r=e.models.axis(),i={top:15,right:10,bottom:50,left:60},s=null,o=null,u=e.utils.getColor(),a=!0,f=!0,l=!1,c=!1,h=!0,p=function(e,t,n,r,i){return"

"+t+"

"+"

"+n+"

"},d,v,m="No Data Available.",g=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate"),y=250;n.orient("bottom").highlightZero(!1).showMaxMin(!1).tickFormat(function(e){return e}),r.orient(l?"right":"left").tickFormat(d3.format(",.1f"));var b=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=p(i.series.key,a,f,i,w);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+i.left,e.pos[1]+i.top],g.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)}),g.on("tooltipHide",function(){h&&e.tooltip.cleanup()}),w.dispatch=g,w.discretebar=t,w.xAxis=n,w.yAxis=r,d3.rebind(w,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","id","showValues","valueFormat"),w.options=e.utils.optionsFunc.bind(w),w.margin=function(e){return arguments.length?(i.top=typeof e.top!="undefined"?e.top:i.top,i.right=typeof e.right!="undefined"?e.right:i.right,i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom,i.left=typeof e.left!="undefined"?e.left:i.left,w):i},w.width=function(e){return arguments.length?(s=e,w):s},w.height=function(e){return arguments.length?(o=e,w):o},w.color=function(n){return arguments.length?(u=e.utils.getColor(n),t.color(u),w):u},w.showXAxis=function(e){return arguments.length?(a=e,w):a},w.showYAxis=function(e){return arguments.length?(f=e,w):f},w.rightAlignYAxis=function(e){return arguments.length?(l=e,r.orient(e?"right":"left"),w):l},w.staggerLabels=function(e){return arguments.length?(c=e,w):c},w.tooltips=function(e){return arguments.length?(h=e,w):h},w.tooltipContent=function(e){return arguments.length?(p=e,w):p},w.noData=function(e){return arguments.length?(m=e,w):m},w.transitionDuration=function(e){return arguments.length?(y=e,w):y},w},e.models.distribution=function(){"use strict";function l(e){return e.each(function(e){var a=n-(i==="x"?t.left+t.right:t.top+t.bottom),l=i=="x"?"y":"x",c=d3.select(this);f=f||u;var h=c.selectAll("g.nv-distribution").data([e]),p=h.enter().append("g").attr("class","nvd3 nv-distribution"),d=p.append("g"),v=h.select("g");h.attr("transform","translate("+t.left+","+t.top+")");var m=v.selectAll("g.nv-dist").data(function(e){return e},function(e){return e.key});m.enter().append("g"),m.attr("class",function(e,t){return"nv-dist nv-series-"+t}).style("stroke",function(e,t){return o(e,t)});var g=m.selectAll("line.nv-dist"+i).data(function(e){return e.values});g.enter().append("line").attr(i+"1",function(e,t){return f(s(e,t))}).attr(i+"2",function(e,t){return f(s(e,t))}),m.exit().selectAll("line.nv-dist"+i).transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}).style("stroke-opacity",0).remove(),g.attr("class",function(e,t){return"nv-dist"+i+" nv-dist"+i+"-"+t}).attr(l+"1",0).attr(l+"2",r),g.transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}),f=u.copy()}),l}var t={top:0,right:0,bottom:0,left:0},n=400,r=8,i="x",s=function(e){return e[i]},o=e.utils.defaultColor(),u=d3.scale.linear(),a,f;return l.options=e.utils.optionsFunc.bind(l),l.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,l):t},l.width=function(e){return arguments.length?(n=e,l):n},l.axis=function(e){return arguments.length?(i=e,l):i},l.size=function(e){return arguments.length?(r=e,l):r},l.getData=function(e){return arguments.length?(s=d3.functor(e),l):s},l.scale=function(e){return arguments.length?(u=e,l):u},l.color=function(t){return arguments.length?(o=e.utils.getColor(t),l):o},l},e.models.historicalBar=function(){"use strict";function w(E){return E.each(function(w){var E=n-t.left-t.right,S=r-t.top-t.bottom,T=d3.select(this);s.domain(d||d3.extent(w[0].values.map(u).concat(f))),c?s.range(m||[E*.5/w[0].values.length,E*(w[0].values.length-.5)/w[0].values.length]):s.range(m||[0,E]),o.domain(v||d3.extent(w[0].values.map(a).concat(l))).range(g||[S,0]),s.domain()[0]===s.domain()[1]&&(s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1])),o.domain()[0]===o.domain()[1]&&(o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]));var N=T.selectAll("g.nv-wrap.nv-historicalBar-"+i).data([w[0].values]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+i),k=C.append("defs"),L=C.append("g"),A=N.select("g");L.append("g").attr("class","nv-bars"),N.attr("transform","translate("+t.left+","+t.top+")"),T.on("click",function(e,t){y.chartClick({data:e,index:t,pos:d3.event,id:i})}),k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect"),N.select("#nv-chart-clip-path-"+i+" rect").attr("width",E).attr("height",S),A.attr("clip-path",h?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-bars").selectAll(".nv-bar").data(function(e){return e},function(e,t){return u(e,t)});O.exit().remove();var M=O.enter().append("rect").attr("x",0).attr("y",function(t,n){return e.utils.NaNtoZero(o(Math.max(0,a(t,n))))}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.abs(o(a(t,n))-o(0)))}).attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).on("mouseover",function(e,t){if(!b)return;d3.select(this).classed("hover",!0),y.elementMouseover({point:e,series:w[0],pos:[s(u(e,t)),o(a(e,t))],pointIndex:t,seriesIndex:0,e:d3.event})}).on("mouseout",function(e,t){if(!b)return;d3.select(this).classed("hover",!1),y.elementMouseout({point:e,series:w[0],pointIndex:t,seriesIndex:0,e:d3.event})}).on("click",function(e,t){if(!b)return;y.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()}).on("dblclick",function(e,t){if(!b)return;y.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()});O.attr("fill",function(e,t){return p(e,t)}).attr("class",function(e,t,n){return(a(e,t)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+t}).transition().attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).attr("width",E/w[0].values.length*.9),O.transition().attr("y",function(t,n){var r=a(t,n)<0?o(0):o(0)-o(a(t,n))<1?o(0)-1:o(a(t,n));return e.utils.NaNtoZero(r)}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.max(Math.abs(o(a(t,n))-o(0)),1))})}),w}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[],l=[0],c=!1,h=!0,p=e.utils.defaultColor(),d,v,m,g,y=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),b=!0;return w.highlightPoint=function(e,t){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar-0-"+e).classed("hover",t)},w.clearHighlights=function(){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar.hover").classed("hover",!1)},w.dispatch=y,w.options=e.utils.optionsFunc.bind(w),w.x=function(e){return arguments.length?(u=e,w):u},w.y=function(e){return arguments.length?(a=e,w):a},w.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,w):t},w.width=function(e){return arguments.length?(n=e,w):n},w.height=function(e){return arguments.length?(r=e,w):r},w.xScale=function(e){return arguments.length?(s=e,w):s},w.yScale=function(e){return arguments.length?(o=e,w):o},w.xDomain=function(e){return arguments.length?(d=e,w):d},w.yDomain=function(e){return arguments.length?(v=e,w):v},w.xRange=function(e){return arguments.length?(m=e,w):m},w.yRange=function(e){return arguments.length?(g=e,w):g},w.forceX=function(e){return arguments.length?(f=e,w):f},w.forceY=function(e){return arguments.length?(l=e,w):l},w.padData=function(e){return arguments.length?(c=e,w):c},w.clipEdge=function(e){return arguments.length?(h=e,w):h},w.color=function(t){return arguments.length?(p=e.utils.getColor(t),w):p},w.id=function(e){return arguments.length?(i=e,w):i},w.interactive=function(e){return arguments.length?(b=!1,w):b},w},e.models.historicalBarChart=function(){"use strict";function x(e){return e.each(function(d){var T=d3.select(this),N=this,C=(u||parseInt(T.style("width"))||960)-s.left-s.right,k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom;x.update=function(){T.transition().duration(E).call(x)},x.container=this,g.disabled=d.map(function(e){return!!e.disabled});if(!y){var L;y={};for(L in g)g[L]instanceof Array?y[L]=g[L].slice(0):y[L]=g[L]}if(!d||!d.length||!d.filter(function(e){return e.values.length}).length){var A=T.selectAll(".nv-noData").data([b]);return A.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),A.attr("x",s.left+C/2).attr("y",s.top+k/2).text(function(e){return e}),x}T.selectAll(".nv-noData").remove(),v=t.xScale(),m=t.yScale();var O=T.selectAll("g.nv-wrap.nv-historicalBarChart").data([d]),M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),_=O.select("g");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis"),M.append("g").attr("class","nv-barsWrap"),M.append("g").attr("class","nv-legendWrap"),f&&(i.width(C),_.select(".nv-legendWrap").datum(d).call(i),s.top!=i.height()&&(s.top=i.height(),k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom),O.select(".nv-legendWrap").attr("transform","translate(0,"+ -s.top+")")),O.attr("transform","translate("+s.left+","+s.top+")"),h&&_.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)"),t.width(C).height(k).color(d.map(function(e,t){return e.color||o(e,t)}).filter(function(e,t){return!d[t].disabled}));var D=_.select(".nv-barsWrap").datum(d.filter(function(e){return!e.disabled}));D.transition().call(t),l&&(n.scale(v).tickSize(-k,0),_.select(".nv-x.nv-axis").attr("transform","translate(0,"+m.range()[0]+")"),_.select(".nv-x.nv-axis").transition().call(n)),c&&(r.scale(m).ticks(k/36).tickSize(-C,0),_.select(".nv-y.nv-axis").transition().call(r)),i.dispatch.on("legendClick",function(t,n){t.disabled=!t.disabled,d.filter(function(e){return!e.disabled}).length||d.map(function(e){return e.disabled=!1,O.selectAll(".nv-series").classed("disabled",!1),e}),g.disabled=d.map(function(e){return!!e.disabled}),w.stateChange(g),e.transition().call(x)}),i.dispatch.on("legendDblclick",function(e){d.forEach(function(e){e.disabled=!0}),e.disabled=!1,g.disabled=d.map(function(e){return!!e.disabled}),w.stateChange(g),x.update()}),w.on("tooltipShow",function(e){p&&S(e,N.parentNode)}),w.on("changeState",function(e){typeof e.disabled!="undefined"&&(d.forEach(function(t,n){t.disabled=e.disabled[n]}),g.disabled=e.disabled),x.update()})}),x}var t=e.models.historicalBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s={top:30,right:90,bottom:50,left:90},o=e.utils.defaultColor(),u=null,a=null,f=!1,l=!0,c=!0,h=!1,p=!0,d=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" at "+t+"

"},v,m,g={},y=null,b="No Data Available.",w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E=250;n.orient("bottom").tickPadding(7),r.orient(h?"right":"left");var S=function(i,s){if(s){var o=d3.select(s).select("svg"),u=o.node()?o.attr("viewBox"):null;if(u){u=u.split(" ");var a=parseInt(o.style("width"))/u[2];i.pos[0]=i.pos[0]*a,i.pos[1]=i.pos[1]*a}}var f=i.pos[0]+(s.offsetLeft||0),l=i.pos[1]+(s.offsetTop||0),c=n.tickFormat()(t.x()(i.point,i.pointIndex)),h=r.tickFormat()(t.y()(i.point,i.pointIndex)),p=d(i.series.key,c,h,i,x);e.tooltip.show([f,l],p,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+s.left,e.pos[1]+s.top],w.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){w.tooltipHide(e)}),w.on("tooltipHide",function(){p&&e.tooltip.cleanup()}),x.dispatch=w,x.bars=t,x.legend=i,x.xAxis=n,x.yAxis=r,d3.rebind(x,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate","highlightPoint","clearHighlights","interactive"),x.options=e.utils.optionsFunc.bind(x),x.margin=function(e){return arguments.length?(s.top=typeof e.top!="undefined"?e.top:s.top,s.right=typeof e.right!="undefined"?e.right:s.right,s.bottom=typeof e.bottom!="undefined"?e.bottom:s.bottom,s.left=typeof e.left!="undefined"?e.left:s.left,x):s},x.width=function(e){return arguments.length?(u=e,x):u},x.height=function(e){return arguments.length?(a=e,x):a},x.color=function(t){return arguments.length?(o=e.utils.getColor(t),i.color(o),x):o},x.showLegend=function(e){return arguments.length?(f=e,x):f},x.showXAxis=function(e){return arguments.length?(l=e,x):l},x.showYAxis=function(e){return arguments.length?(c=e,x):c},x.rightAlignYAxis=function(e){return arguments.length?(h=e,r.orient(e?"right":"left"),x):h},x.tooltips=function(e){return arguments.length?(p=e,x):p},x.tooltipContent=function(e){return arguments.length?(d=e,x):d},x.state=function(e){return arguments.length?(g=e,x):g},x.defaultState=function(e){return arguments.length?(y=e,x):y},x.noData=function(e){return arguments.length?(b=e,x):b},x.transitionDuration=function(e){return arguments.length?(E=e,x):E},x},e.models.indentedTree=function(){"use strict";function g(e){return e.each(function(e){function k(e,t,n){d3.event.stopPropagation();if(d3.event.shiftKey&&!n)return d3.event.shiftKey=!1,e.values&&e.values.forEach(function(e){(e.values||e._values)&&k(e,0,!0)}),!0;if(!O(e))return!0;e.values?(e._values=e.values,e.values=null):(e.values=e._values,e._values=null),g.update()}function L(e){return e._values&&e._values.length?h:e.values&&e.values.length?p:""}function A(e){return e._values&&e._values.length}function O(e){var t=e.values||e._values;return t&&t.length}var t=1,n=d3.select(this),i=d3.layout.tree().children(function(e){return e.values}).size([r,f]);g.update=function(){n.transition().duration(600).call(g)},e[0]||(e[0]={key:a});var s=i.nodes(e[0]),y=d3.select(this).selectAll("div").data([[s]]),b=y.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree"),w=b.append("table"),E=y.select("table").attr("width","100%").attr("class",c);if(o){var S=w.append("thead"),x=S.append("tr");l.forEach(function(e){x.append("th").attr("width",e.width?e.width:"10%").style("text-align",e.type=="numeric"?"right":"left").append("span").text(e.label)})}var T=E.selectAll("tbody").data(function(e){return e});T.enter().append("tbody"),t=d3.max(s,function(e){return e.depth}),i.size([r,t*f]);var N=T.selectAll("tr").data(function(e){return e.filter(function(e){return u&&!e.children?u(e):!0})},function(e,t){return e.id||e.id||++m});N.exit().remove(),N.select("img.nv-treeicon").attr("src",L).classed("folded",A);var C=N.enter().append("tr");l.forEach(function(e,t){var n=C.append("td").style("padding-left",function(e){return(t?0:e.depth*f+12+(L(e)?0:16))+"px"},"important").style("text-align",e.type=="numeric"?"right":"left");t==0&&n.append("img").classed("nv-treeicon",!0).classed("nv-folded",A).attr("src",L).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(e){return L(e)?"inline-block":"none"}).on("click",k),n.each(function(n){!t&&v(n)?d3.select(this).append("a").attr("href",v).attr("class",d3.functor(e.classes)).append("span"):d3.select(this).append("span"),d3.select(this).select("span").attr("class",d3.functor(e.classes)).text(function(t){return e.format?e.format(t):t[e.key]||"-"})}),e.showCount&&(n.append("span").attr("class","nv-childrenCount"),N.selectAll("span.nv-childrenCount").text(function(e){return e.values&&e.values.length||e._values&&e._values.length?"("+(e.values&&e.values.filter(function(e){return u?u(e):!0}).length||e._values&&e._values.filter(function(e){return u?u(e):!0}).length||0)+")":""}))}),N.order().on("click",function(e){d.elementClick({row:this,data:e,pos:[e.x,e.y]})}).on("dblclick",function(e){d.elementDblclick({row:this,data:e,pos:[e.x,e.y]})}).on("mouseover",function(e){d.elementMouseover({row:this,data:e,pos:[e.x,e.y]})}).on("mouseout",function(e){d.elementMouseout({row:this,data:e,pos:[e.x,e.y]})})}),g}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e4),o=!0,u=!1,a="No Data Available.",f=20,l=[{key:"key",label:"Name",type:"text"}],c=null,h="images/grey-plus.png",p="images/grey-minus.png",d=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),v=function(e){return e.url},m=0;return g.options=e.utils.optionsFunc.bind(g),g.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,g):t},g.width=function(e){return arguments.length?(n=e,g):n},g.height=function(e){return arguments.length?(r=e,g):r},g.color=function(t){return arguments.length?(i=e.utils.getColor(t),scatter.color(i),g):i},g.id=function(e){return arguments.length?(s=e,g):s},g.header=function(e){return arguments.length?(o=e,g):o},g.noData=function(e){return arguments.length?(a=e,g):a},g.filterZero=function(e){return arguments.length?(u=e,g):u},g.columns=function(e){return arguments.length?(l=e,g):l},g.tableClass=function(e){return arguments.length?(c=e,g):c},g.iconOpen=function(e){return arguments.length?(h=e,g):h},g.iconClose=function(e){return arguments.length?(p=e,g):p},g.getUrl=function(e){return arguments.length?(v=e,g):v},g},e.models.legend=function(){"use strict";function c(h){return h.each(function(c){var h=n-t.left-t.right,p=d3.select(this),d=p.selectAll("g.nv-legend").data([c]),v=d.enter().append("g").attr("class","nvd3 nv-legend").append("g"),m=d.select("g");d.attr("transform","translate("+t.left+","+t.top+")");var g=m.selectAll(".nv-series").data(function(e){return e}),y=g.enter().append("g").attr("class","nv-series").on("mouseover",function(e,t){l.legendMouseover(e,t)}).on("mouseout",function(e,t){l.legendMouseout(e,t)}).on("click",function(e,t){l.legendClick(e,t),a&&(f?(c.forEach(function(e){e.disabled=!0}),e.disabled=!1):(e.disabled=!e.disabled,c.every(function(e){return e.disabled})&&c.forEach(function(e){e.disabled=!1})),l.stateChange({disabled:c.map(function(e){return!!e.disabled})}))}).on("dblclick",function(e,t){l.legendDblclick(e,t),a&&(c.forEach(function(e){e.disabled=!0}),e.disabled=!1,l.stateChange({disabled:c.map(function(e){return!!e.disabled})}))});y.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),y.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8"),g.classed("disabled",function(e){return e.disabled}),g.exit().remove(),g.select("circle").style("fill",function(e,t){return e.color||s(e,t)}).style("stroke",function(e,t){return e.color||s(e,t)}),g.select("text").text(i);if(o){var b=[];g.each(function(t,n){var r=d3.select(this).select("text"),i;try{i=r.getComputedTextLength();if(i<=0)throw Error()}catch(s){i=e.utils.calcApproxTextWidth(r)}b.push(i+28)});var w=0,E=0,S=[];while(Eh&&w>1){S=[],w--;for(var x=0;x(S[x%w]||0)&&(S[x%w]=b[x]);E=S.reduce(function(e,t,n,r){return e+t})}var T=[];for(var N=0,C=0;NA&&(A=L),"translate("+O+","+k+")"}),m.attr("transform","translate("+(n-t.right-A)+","+t.top+")"),r=t.top+t.bottom+k+15}}),c}var t={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},s=e.utils.defaultColor(),o=!0,u=!0,a=!0,f=!1,l=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange");return c.dispatch=l,c.options=e.utils.optionsFunc.bind(c),c.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,c):t},c.width=function(e){return arguments.length?(n=e,c):n},c.height=function(e){return arguments.length?(r=e,c):r},c.key=function(e){return arguments.length?(i=e,c):i},c.color=function(t){return arguments.length?(s=e.utils.getColor(t),c):s},c.align=function(e){return arguments.length?(o=e,c):o},c.rightAlign=function(e){return arguments.length?(u=e,c):u},c.updateState=function(e){return arguments.length?(a=e,c):a},c.radioButtonMode=function(e){return arguments.length?(f=e,c):f},c},e.models.line=function(){"use strict";function m(g){return g.each(function(m){var g=r-n.left-n.right,b=i-n.top-n.bottom,w=d3.select(this);c=t.xScale(),h=t.yScale(),d=d||c,v=v||h;var E=w.selectAll("g.nv-wrap.nv-line").data([m]),S=E.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),T=S.append("defs"),N=S.append("g"),C=E.select("g");N.append("g").attr("class","nv-groups"),N.append("g").attr("class","nv-scatterWrap"),E.attr("transform","translate("+n.left+","+n.top+")"),t.width(g).height(b);var k=E.select(".nv-scatterWrap");k.transition().call(t),T.append("clipPath").attr("id","nv-edge-clip-"+t.id()).append("rect"),E.select("#nv-edge-clip-"+t.id()+" rect").attr("width",g).attr("height",b),C.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":""),k.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");var L=E.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});L.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),L.exit().remove(),L.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return s(e,t)}).style("stroke",function(e,t){return s(e,t)}),L.transition().style("stroke-opacity",1).style("fill-opacity",.5);var A=L.selectAll("path.nv-area").data(function(e){return f(e)?[e]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e. -utils.NaNtoZero(d(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}).y1(function(e,t){return v(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])}),L.exit().selectAll("path.nv-area").remove(),A.transition().attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}).y1(function(e,t){return h(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});var O=L.selectAll("path.nv-line").data(function(e){return[e.values]});O.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))})),O.transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))})),d=c.copy(),v=h.copy()}),m}var t=e.models.scatter(),n={top:0,right:0,bottom:0,left:0},r=960,i=500,s=e.utils.defaultColor(),o=function(e){return e.x},u=function(e){return e.y},a=function(e,t){return!isNaN(u(e,t))&&u(e,t)!==null},f=function(e){return e.area},l=!1,c,h,p="linear";t.size(16).sizeDomain([16,256]);var d,v;return m.dispatch=t.dispatch,m.scatter=t,d3.rebind(m,t,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","padData","highlightPoint","clearHighlights"),m.options=e.utils.optionsFunc.bind(m),m.margin=function(e){return arguments.length?(n.top=typeof e.top!="undefined"?e.top:n.top,n.right=typeof e.right!="undefined"?e.right:n.right,n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom,n.left=typeof e.left!="undefined"?e.left:n.left,m):n},m.width=function(e){return arguments.length?(r=e,m):r},m.height=function(e){return arguments.length?(i=e,m):i},m.x=function(e){return arguments.length?(o=e,t.x(e),m):o},m.y=function(e){return arguments.length?(u=e,t.y(e),m):u},m.clipEdge=function(e){return arguments.length?(l=e,m):l},m.color=function(n){return arguments.length?(s=e.utils.getColor(n),t.color(s),m):s},m.interpolate=function(e){return arguments.length?(p=e,m):p},m.defined=function(e){return arguments.length?(a=e,m):a},m.isArea=function(e){return arguments.length?(f=d3.functor(e),m):f},m},e.models.lineChart=function(){"use strict";function N(m){return m.each(function(m){var C=d3.select(this),k=this,L=(a||parseInt(C.style("width"))||960)-o.left-o.right,A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom;N.update=function(){C.transition().duration(x).call(N)},N.container=this,b.disabled=m.map(function(e){return!!e.disabled});if(!w){var O;w={};for(O in b)b[O]instanceof Array?w[O]=b[O].slice(0):w[O]=b[O]}if(!m||!m.length||!m.filter(function(e){return e.values.length}).length){var M=C.selectAll(".nv-noData").data([E]);return M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),M.attr("x",o.left+L/2).attr("y",o.top+A/2).text(function(e){return e}),N}C.selectAll(".nv-noData").remove(),g=t.xScale(),y=t.yScale();var _=C.selectAll("g.nv-wrap.nv-lineChart").data([m]),D=_.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),P=_.select("g");D.append("rect").style("opacity",0),D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-linesWrap"),D.append("g").attr("class","nv-legendWrap"),D.append("g").attr("class","nv-interactive"),P.select("rect").attr("width",L).attr("height",A>0?A:0),l&&(i.width(L),P.select(".nv-legendWrap").datum(m).call(i),o.top!=i.height()&&(o.top=i.height(),A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom),_.select(".nv-legendWrap").attr("transform","translate(0,"+ -o.top+")")),_.attr("transform","translate("+o.left+","+o.top+")"),p&&P.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)"),d&&(s.width(L).height(A).margin({left:o.left,top:o.top}).svgContainer(C).xScale(g),_.select(".nv-interactive").call(s)),t.width(L).height(A).color(m.map(function(e,t){return e.color||u(e,t)}).filter(function(e,t){return!m[t].disabled}));var H=P.select(".nv-linesWrap").datum(m.filter(function(e){return!e.disabled}));H.transition().call(t),c&&(n.scale(g).ticks(L/100).tickSize(-A,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")"),P.select(".nv-x.nv-axis").transition().call(n)),h&&(r.scale(y).ticks(A/36).tickSize(-L,0),P.select(".nv-y.nv-axis").transition().call(r)),i.dispatch.on("stateChange",function(e){b=e,S.stateChange(b),N.update()}),s.dispatch.on("elementMousemove",function(i){t.clearHighlights();var a,f,l,c=[];m.filter(function(e,t){return e.seriesIndex=t,!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,N.x()),t.highlightPoint(r,f,!0);var s=n.values[f];if(typeof s=="undefined")return;typeof a=="undefined"&&(a=s),typeof l=="undefined"&&(l=N.xScale()(N.x()(s,f))),c.push({key:n.key,value:N.y()(s,f),color:u(n,n.seriesIndex)})});if(c.length>2){var h=N.yScale().invert(i.mouseY),p=Math.abs(N.yScale().domain()[0]-N.yScale().domain()[1]),d=.03*p,g=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);g!==null&&(c[g].highlight=!0)}var y=n.tickFormat()(N.x()(a,f));s.tooltip.position({left:l+o.left,top:i.mouseY+o.top}).chartContainer(k.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:y,series:c})(),s.renderGuideLine(l)}),s.dispatch.on("elementMouseout",function(e){S.tooltipHide(),t.clearHighlights()}),S.on("tooltipShow",function(e){v&&T(e,k.parentNode)}),S.on("changeState",function(e){typeof e.disabled!="undefined"&&m.length===e.disabled.length&&(m.forEach(function(t,n){t.disabled=e.disabled[n]}),b.disabled=e.disabled),N.update()})}),N}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.interactiveGuideline(),o={top:30,right:20,bottom:50,left:60},u=e.utils.defaultColor(),a=null,f=null,l=!0,c=!0,h=!0,p=!1,d=!1,v=!0,m=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" at "+t+"

"},g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=250;n.orient("bottom").tickPadding(7),r.orient(p?"right":"left");var T=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,N);e.tooltip.show([o,u],l,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top],S.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),S.on("tooltipHide",function(){v&&e.tooltip.cleanup()}),N.dispatch=S,N.lines=t,N.legend=i,N.xAxis=n,N.yAxis=r,N.interactiveLayer=s,d3.rebind(N,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id","interpolate"),N.options=e.utils.optionsFunc.bind(N),N.margin=function(e){return arguments.length?(o.top=typeof e.top!="undefined"?e.top:o.top,o.right=typeof e.right!="undefined"?e.right:o.right,o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom,o.left=typeof e.left!="undefined"?e.left:o.left,N):o},N.width=function(e){return arguments.length?(a=e,N):a},N.height=function(e){return arguments.length?(f=e,N):f},N.color=function(t){return arguments.length?(u=e.utils.getColor(t),i.color(u),N):u},N.showLegend=function(e){return arguments.length?(l=e,N):l},N.showXAxis=function(e){return arguments.length?(c=e,N):c},N.showYAxis=function(e){return arguments.length?(h=e,N):h},N.rightAlignYAxis=function(e){return arguments.length?(p=e,r.orient(e?"right":"left"),N):p},N.useInteractiveGuideline=function(e){return arguments.length?(d=e,e===!0&&(N.interactive(!1),N.useVoronoi(!1)),N):d},N.tooltips=function(e){return arguments.length?(v=e,N):v},N.tooltipContent=function(e){return arguments.length?(m=e,N):m},N.state=function(e){return arguments.length?(b=e,N):b},N.defaultState=function(e){return arguments.length?(w=e,N):w},N.noData=function(e){return arguments.length?(E=e,N):E},N.transitionDuration=function(e){return arguments.length?(x=e,N):x},N},e.models.linePlusBarChart=function(){"use strict";function T(e){return e.each(function(e){var l=d3.select(this),c=this,v=(a||parseInt(l.style("width"))||960)-u.left-u.right,N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom;T.update=function(){l.transition().call(T)},b.disabled=e.map(function(e){return!!e.disabled});if(!w){var C;w={};for(C in b)b[C]instanceof Array?w[C]=b[C].slice(0):w[C]=b[C]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var k=l.selectAll(".nv-noData").data([E]);return k.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),k.attr("x",u.left+v/2).attr("y",u.top+N/2).text(function(e){return e}),T}l.selectAll(".nv-noData").remove();var L=e.filter(function(e){return!e.disabled&&e.bar}),A=e.filter(function(e){return!e.bar});m=A.filter(function(e){return!e.disabled}).length&&A.filter(function(e){return!e.disabled})[0].values.length?t.xScale():n.xScale(),g=n.yScale(),y=t.yScale();var O=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([e]),M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),_=O.select("g");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y1 nv-axis"),M.append("g").attr("class","nv-y2 nv-axis"),M.append("g").attr("class","nv-barsWrap"),M.append("g").attr("class","nv-linesWrap"),M.append("g").attr("class","nv-legendWrap"),p&&(o.width(v/2),_.select(".nv-legendWrap").datum(e.map(function(e){return e.originalKey=e.originalKey===undefined?e.key:e.originalKey,e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)"),e})).call(o),u.top!=o.height()&&(u.top=o.height(),N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom),_.select(".nv-legendWrap").attr("transform","translate("+v/2+","+ -u.top+")")),O.attr("transform","translate("+u.left+","+u.top+")"),t.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar})),n.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));var D=_.select(".nv-barsWrap").datum(L.length?L:[{values:[]}]),P=_.select(".nv-linesWrap").datum(A[0]&&!A[0].disabled?A:[{values:[]}]);d3.transition(D).call(n),d3.transition(P).call(t),r.scale(m).ticks(v/100).tickSize(-N,0),_.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")"),d3.transition(_.select(".nv-x.nv-axis")).call(r),i.scale(g).ticks(N/36).tickSize(-v,0),d3.transition(_.select(".nv-y1.nv-axis")).style("opacity",L.length?1:0).call(i),s.scale(y).ticks(N/36).tickSize(L.length?0:-v,0),_.select(".nv-y2.nv-axis").style("opacity",A.length?1:0).attr("transform","translate("+v+",0)"),d3.transition(_.select(".nv-y2.nv-axis")).call(s),o.dispatch.on("stateChange",function(e){b=e,S.stateChange(b),T.update()}),S.on("tooltipShow",function(e){d&&x(e,c.parentNode)}),S.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),b.disabled=t.disabled),T.update()})}),T}var t=e.models.line(),n=e.models.historicalBar(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.legend(),u={top:30,right:60,bottom:50,left:60},a=null,f=null,l=function(e){return e.x},c=function(e){return e.y},h=e.utils.defaultColor(),p=!0,d=!0,v=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" at "+t+"

"},m,g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");n.padData(!0),t.clipEdge(!1).padData(!0),r.orient("bottom").tickPadding(7).highlightZero(!1),i.orient("left"),s.orient("right");var x=function(n,o){var u=n.pos[0]+(o.offsetLeft||0),a=n.pos[1]+(o.offsetTop||0),f=r.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?i:s).tickFormat()(t.y()(n.point,n.pointIndex)),c=v(n.series.key,f,l,n,T);e.tooltip.show([u,a],c,n.value<0?"n":"s",null,o)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],S.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),n.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],S.tooltipShow(e)}),n.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),S.on("tooltipHide",function(){d&&e.tooltip.cleanup()}),T.dispatch=S,T.legend=o,T.lines=t,T.bars=n,T.xAxis=r,T.y1Axis=i,T.y2Axis=s,d3.rebind(T,t,"defined","size","clipVoronoi","interpolate"),T.options=e.utils.optionsFunc.bind(T),T.x=function(e){return arguments.length?(l=e,t.x(e),n.x(e),T):l},T.y=function(e){return arguments.length?(c=e,t.y(e),n.y(e),T):c},T.margin=function(e){return arguments.length?(u.top=typeof e.top!="undefined"?e.top:u.top,u.right=typeof e.right!="undefined"?e.right:u.right,u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom,u.left=typeof e.left!="undefined"?e.left:u.left,T):u},T.width=function(e){return arguments.length?(a=e,T):a},T.height=function(e){return arguments.length?(f=e,T):f},T.color=function(t){return arguments.length?(h=e.utils.getColor(t),o.color(h),T):h},T.showLegend=function(e){return arguments.length?(p=e,T):p},T.tooltips=function(e){return arguments.length?(d=e,T):d},T.tooltipContent=function(e){return arguments.length?(v=e,T):v},T.state=function(e){return arguments.length?(b=e,T):b},T.defaultState=function(e){return arguments.length?(w=e,T):w},T.noData=function(e){return arguments.length?(E=e,T):E},T},e.models.lineWithFocusChart=function(){"use strict";function k(e){return e.each(function(e){function U(e){var t=+(e=="e"),n=t?1:-1,r=M/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function z(){a.empty()||a.extent(w),I.data([a.empty()?g.domain():w]).each(function(e,t){var n=g(e[0])-v.range()[0],r=v.range()[1]-g(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n),d3.select(this).select(".right").attr("x",g(e[1])).attr("width",r<0?0:r)})}function W(){w=a.empty()?null:a.extent();var n=a.empty()?g.domain():a.extent();if(Math.abs(n[0]-n[1])<=1)return;T.brush({extent:n,brush:a}),z();var s=H.select(".nv-focus .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}).map(function(e,r){return{key:e.key,values:e.values.filter(function(e,r){return t.x()(e,r)>=n[0]&&t.x()(e,r)<=n[1]})}}));s.transition().duration(N).call(t),H.select(".nv-focus .nv-x.nv-axis").transition().duration(N).call(r),H.select(".nv-focus .nv-y.nv-axis").transition().duration(N).call(i)}var S=d3.select(this),L=this,A=(h||parseInt(S.style("width"))||960)-f.left-f.right,O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d,M=d-l.top-l.bottom;k.update=function(){S.transition().duration(N).call(k)},k.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var _=S.selectAll(".nv-noData").data([x]);return _.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),_.attr("x",f.left+A/2).attr("y",f.top+O/2).text(function(e){return e}),k}S.selectAll(".nv-noData").remove(),v=t.xScale(),m=t.yScale(),g=n.xScale(),y=n.yScale();var D=S.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([e]),P=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),H=D.select("g");P.append("g").attr("class","nv-legendWrap");var B=P.append("g").attr("class","nv-focus");B.append("g").attr("class","nv-x nv-axis"),B.append("g").attr("class","nv-y nv-axis"),B.append("g").attr("class","nv-linesWrap");var j=P.append("g").attr("class","nv-context");j.append("g").attr("class","nv-x nv-axis"),j.append("g").attr("class","nv-y nv-axis"),j.append("g").attr("class","nv-linesWrap"),j.append("g").attr("class","nv-brushBackground"),j.append("g").attr("class","nv-x nv-brush"),b&&(u.width(A),H.select(".nv-legendWrap").datum(e).call(u),f.top!=u.height()&&(f.top=u.height(),O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d),H.select(".nv-legendWrap").attr("transform","translate(0,"+ -f.top+")")),D.attr("transform","translate("+f.left+","+f.top+")"),t.width(A).height(O).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),n.defined(t.defined()).width(A).height(M).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),H.select(".nv-context").attr("transform","translate(0,"+(O+f.bottom+l.top)+")");var F=H.select(".nv-context .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}));d3.transition(F).call(n),r.scale(v).ticks(A/100).tickSize(-O,0),i.scale(m).ticks(O/36).tickSize(-A,0),H.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+O+")"),a.x(g).on("brush",function(){var e=k.transitionDuration();k.transitionDuration(0),W(),k.transitionDuration(e)}),w&&a.extent(w);var I=H.select(".nv-brushBackground").selectAll("g").data([w||a.extent()]),q=I.enter().append("g");q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M),q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var R=H.select(".nv-x.nv-brush").call(a);R.selectAll("rect").attr("height",M),R.selectAll(".resize").append("path").attr("d",U),W(),s.scale(g).ticks(A/100).tickSize(-M,0),H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")"),d3.transition(H.select(".nv-context .nv-x.nv-axis")).call(s),o.scale(y).ticks(M/36).tickSize(-A,0),d3.transition(H.select(".nv-context .nv-y.nv-axis")).call(o),H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")"),u.dispatch.on("stateChange",function(e){k.update()}),T.on("tooltipShow",function(e){E&&C(e,L.parentNode)})}),k}var t=e.models.line(),n=e.models.line(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.axis(),u=e.models.legend(),a=d3.svg.brush(),f={top:30,right:30,bottom:30,left:60},l={top:0,right:30,bottom:20,left:60},c=e.utils.defaultColor(),h=null,p=null,d=100,v,m,g,y,b=!0,w=null,E=!0,S=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" at "+t+"

"},x="No Data Available.",T=d3.dispatch("tooltipShow","tooltipHide","brush"),N=250;t.clipEdge(!0),n.interactive(!1),r.orient("bottom").tickPadding(5),i.orient("left"),s.orient("bottom").tickPadding(5),o.orient("left");var C=function(n,s){var o=n.pos[0]+(s.offsetLeft||0),u=n.pos[1]+(s.offsetTop||0),a=r.tickFormat()(t.x()(n.point,n.pointIndex)),f=i.tickFormat()(t.y()(n.point,n.pointIndex)),l=S(n.series.key,a,f,n,k);e.tooltip.show([o,u],l,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+f.left,e.pos[1]+f.top],T.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),T.on("tooltipHide",function(){E&&e.tooltip.cleanup()}),k.dispatch=T,k.legend=u,k.lines=t,k.lines2=n,k.xAxis=r,k.yAxis=i,k.x2Axis=s,k.y2Axis=o,d3.rebind(k,t,"defined","isArea","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),k.options=e.utils.optionsFunc.bind(k),k.x=function(e){return arguments.length?(t.x(e),n.x(e),k):t.x},k.y=function(e){return arguments.length?(t.y(e),n.y(e),k):t.y},k.margin=function(e){return arguments.length?(f.top=typeof e.top!="undefined"?e.top:f.top,f.right=typeof e.right!="undefined"?e.right:f.right,f.bottom=typeof e.bottom!="undefined"?e.bottom:f.bottom,f.left=typeof e.left!="undefined"?e.left:f.left,k):f},k.margin2=function(e){return arguments.length?(l=e,k):l},k.width=function(e){return arguments.length?(h=e,k):h},k.height=function(e){return arguments.length?(p=e,k):p},k.height2=function(e){return arguments.length?(d=e,k):d},k.color=function(t){return arguments.length?(c=e.utils.getColor(t),u.color(c),k):c},k.showLegend=function(e){return arguments.length?(b=e,k):b},k.tooltips=function(e){return arguments.length?(E=e,k):E},k.tooltipContent=function(e){return arguments.length?(S=e,k):S},k.interpolate=function(e){return arguments.length?(t.interpolate(e),n.interpolate(e),k):t.interpolate()},k.noData=function(e){return arguments.length?(x=e,k):x},k.xTickFormat=function(e){return arguments.length?(r.tickFormat(e),s.tickFormat(e),k):r.tickFormat()},k.yTickFormat=function(e){return arguments.length?(i.tickFormat(e),o.tickFormat(e),k):i.tickFormat()},k.brushExtent=function(e){return arguments.length?(w=e,k):w},k.transitionDuration=function(e){return arguments.length?(N=e,k):N},k},e.models.linePlusBarWithFocusChart=function(){"use strict";function B(e){return e.each(function(e){function nt(e){var t=+(e=="e"),n=t?1:-1,r=q/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function rt(){h.empty()||h.extent(x),Z.data([h.empty()?k.domain():x]).each(function(e,t){var n=k(e[0])-k.range()[0],r=k.range()[1]-k(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n),d3.select(this).select(".right").attr("x",k(e[1])).attr("width",r<0?0:r)})}function it(){x=h.empty()?null:h.extent(),S=h.empty()?k.domain():h.extent(),D.brush({extent:S,brush:h}),rt(),r.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar})),t.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var n=J.select(".nv-focus .nv-barsWrap").datum(U.length?U.map(function(e,t){return{key:e.key,values:e.values.filter(function(e,t){return r.x()(e,t)>=S[0]&&r.x()(e,t)<=S[1]})}}):[{values:[]}]),i=J.select(".nv-focus .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z.map(function(e,n){return{key:e.key,values:e.values.filter(function(e,n){return t.x()(e,n)>=S[0]&&t.x()(e,n)<=S[1]})}}));U.length?C=r.xScale():C=t.xScale(),s.scale(C).ticks(F/100).tickSize(-I,0),s.domain([Math.ceil(S[0]),Math.floor(S[1])]),J.select(".nv-x.nv-axis").transition().duration(P).call(s),n.transition().duration(P).call(r),i.transition().duration(P).call(t),J.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L.range()[0]+")"),u.scale(L).ticks(I/36).tickSize(-F,0),J.select(".nv-focus .nv-y1.nv-axis").style("opacity",U.length?1:0),a.scale(A).ticks(I/36).tickSize(U.length?0:-F,0),J.select(".nv-focus .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+C.range()[1]+",0)"),J.select(".nv-focus .nv-y1.nv-axis").transition().duration(P).call(u),J.select(".nv-focus .nv-y2.nv-axis").transition().duration(P).call(a)}var N=d3.select(this),j=this,F=(v||parseInt(N.style("width"))||960)-p.left-p.right,I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g,q=g-d.top-d.bottom;B.update=function(){N.transition().duration(P).call(B)},B.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=N.selectAll(".nv-noData").data([_]);return R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),R.attr("x",p.left+F/2).attr("y",p.top+I/2).text(function(e){return e}),B}N.selectAll(".nv-noData").remove();var U=e.filter(function(e){return!e.disabled&&e.bar}),z=e.filter(function(e){return!e.bar});C=r.xScale(),k=o.scale(),L=r.yScale(),A=t.yScale(),O=i.yScale(),M=n.yScale();var W=e.filter(function(e){return!e.disabled&&e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})}),X=e.filter(function(e){return!e.disabled&&!e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});C.range([0,F]),k.domain(d3.extent(d3.merge(W.concat(X)),function(e){return e.x})).range([0,F]);var V=N.selectAll("g.nv-wrap.nv-linePlusBar").data([e]),$=V.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),J=V.select("g");$.append("g").attr("class","nv-legendWrap");var K=$.append("g").attr("class","nv-focus");K.append("g").attr("class","nv-x nv-axis"),K.append("g").attr("class","nv-y1 nv-axis"),K.append("g").attr("class","nv-y2 nv-axis"),K.append("g").attr("class","nv-barsWrap"),K.append("g").attr("class","nv-linesWrap");var Q=$.append("g").attr("class","nv-context");Q.append("g").attr("class","nv-x nv-axis"),Q.append("g").attr("class","nv-y1 nv-axis"),Q.append("g").attr("class","nv-y2 nv-axis"),Q.append("g").attr("class","nv-barsWrap"),Q.append("g").attr("class","nv-linesWrap"),Q.append("g").attr("class","nv-brushBackground"),Q.append("g").attr("class","nv-x nv-brush"),E&&(c.width(F/2),J.select(".nv-legendWrap").datum(e.map(function(e){return e.originalKey=e.originalKey===undefined?e.key:e.originalKey,e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)"),e})).call(c),p.top!=c.height()&&(p.top=c.height(),I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g),J.select(".nv-legendWrap").attr("transform","translate("+F/2+","+ -p.top+")")),V.attr("transform","translate("+p.left+","+p.top+")"),i.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar})),n.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var G=J.select(".nv-context .nv-barsWrap").datum(U.length?U:[{values:[]}]),Y=J.select(".nv-context .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z);J.select(".nv-context").attr("transform","translate(0,"+(I+p.bottom+d.top)+")"),G.transition().call(i),Y.transition().call(n),h.x(k).on("brush",it),x&&h.extent(x);var Z=J.select(".nv-brushBackground").selectAll("g").data([x||h.extent()]),et=Z.enter().append("g");et.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",q),et.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",q);var tt=J.select(".nv-x.nv-brush").call(h);tt.selectAll("rect").attr("height",q),tt.selectAll(".resize").append("path").attr("d",nt),o.ticks(F/100).tickSize(-q,0),J.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+O.range()[0]+")"),J.select(".nv-context .nv-x.nv-axis").transition().call(o),f.scale(O).ticks(q/36).tickSize(-F,0),J.select(".nv-context .nv-y1.nv-axis").style("opacity",U.length?1:0).attr("transform","translate(0,"+k.range()[0]+")"),J.select(".nv-context .nv-y1.nv-axis").transition().call(f),l.scale(M).ticks(q/36).tickSize(U.length?0:-F,0),J.select(".nv-context .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+k.range()[1]+",0)"),J.select(".nv-context .nv-y2.nv-axis").transition().call(l),c.dispatch.on("stateChange",function(e){B.update()}),D.on("tooltipShow",function(e){T&&H(e,j.parentNode)}),it()}),B}var t=e.models.line(),n=e.models.line(),r=e.models.historicalBar(),i=e.models.historicalBar(),s=e.models.axis(),o=e.models.axis(),u=e.models.axis(),a=e.models.axis(),f=e.models.axis(),l=e.models.axis(),c=e.models.legend(),h=d3.svg.brush(),p={top:30,right:30,bottom:30,left:60},d={top:0,right:30,bottom:20,left:60},v=null,m=null,g=100,y=function(e){return e.x},b=function(e){return e.y},w=e.utils.defaultColor(),E=!0,S,x=null,T=!0,N=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" at "+t+"

"},C,k,L,A,O,M,_="No Data Available.",D=d3.dispatch("tooltipShow","tooltipHide","brush"),P=0;t.clipEdge(!0),n.interactive(!1),s.orient("bottom").tickPadding(5),u.orient("left"),a.orient("right"),o.orient("bottom").tickPadding(5),f.orient("left"),l.orient("right");var H=function(n,r){S&&(n.pointIndex+=Math.ceil(S[0]));var i=n.pos[0]+(r.offsetLeft||0),o=n.pos[1]+(r.offsetTop||0),f=s.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?u:a).tickFormat()(t.y()(n.point,n.pointIndex)),c=N(n.series.key,f,l,n,B);e.tooltip.show([i,o],c,n.value<0?"n":"s",null,r)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top],D.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)}),r.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top],D.tooltipShow(e)}),r.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)}),D.on("tooltipHide",function(){T&&e.tooltip.cleanup()}),B.dispatch=D,B.legend=c,B.lines=t,B.lines2=n,B.bars=r,B.bars2=i,B.xAxis=s,B.x2Axis=o,B.y1Axis=u,B.y2Axis=a,B.y3Axis=f,B.y4Axis=l,d3.rebind(B,t,"defined","size","clipVoronoi","interpolate"),B.options=e.utils.optionsFunc.bind(B),B.x=function(e){return arguments.length?(y=e,t.x(e),r.x(e),B):y},B.y=function(e){return arguments.length?(b=e,t.y(e),r.y(e),B):b},B.margin=function(e){return arguments.length?(p.top=typeof e.top!="undefined"?e.top:p.top,p.right=typeof e.right!="undefined"?e.right:p.right,p.bottom=typeof e.bottom!="undefined"?e.bottom:p.bottom,p.left=typeof e.left!="undefined"?e.left:p.left,B):p},B.width=function(e){return arguments.length?(v=e,B):v},B.height=function(e){return arguments.length?(m=e,B):m},B.color=function(t){return arguments.length?(w=e.utils.getColor(t),c.color(w),B):w},B.showLegend=function(e){return arguments.length?(E=e,B):E},B.tooltips=function(e){return arguments.length?(T=e,B):T},B.tooltipContent=function(e){return arguments.length?(N=e,B):N},B.noData=function(e){return arguments.length?(_=e,B):_},B.brushExtent=function(e){return arguments.length?(x=e,B):x},B},e.models.multiBar=function(){"use strict";function C(e){return e.each(function(e){var C=n-t.left-t.right,k=r-t.top-t.bottom,L=d3.select(this);d&&e.length&&(d=[{values:e[0].values.map(function(e){return{x:e.x,y:0,series:e.series,size:.01}})}]),c&&(e=d3.layout.stack().offset(h).values(function(e){return e.values}).y(a)(!e.length&&d?d:e)),e.forEach(function(e,t){e.values.forEach(function(e){e.series=t})}),c&&e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y),t.y<0?(t.y1=i,i-=t.size):(t.y1=t.size+r,r+=t.size)})});var A=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});i.domain(y||d3.merge(A).map(function(e){return e.x})).rangeBands(w||[0,C],S),s.domain(b||d3.extent(d3.merge(A).map(function(e){return c?e.y>0?e.y1:e.y1+e.y:e.y}).concat(f))).range(E||[k,0]),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-i.domain()[0]*.01,i.domain()[1]+i.domain()[1]*.01]):i.domain([-1,1])),s.domain()[0]===s.domain()[1]&&(s.domain()[0]?s.domain([s.domain()[0]+s.domain()[0]*.01,s.domain()[1]-s.domain()[1]*.01]):s.domain([-1,1])),T=T||i,N=N||s;var O=L.selectAll("g.nv-wrap.nv-multibar").data([e]),M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),_=M.append("defs"),D=M.append("g"),P=O.select("g");D.append("g").attr("class","nv-groups"),O.attr("transform","translate("+t.left+","+t.top+")"),_.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect"),O.select("#nv-edge-clip-"+o+" rect").attr("width",C).attr("height",k),P.attr("clip-path",l?"url(#nv-edge-clip-"+o+")":"");var H=O.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});H.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),H.exit().transition().selectAll("rect.nv-bar").delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e){return c?N(e.y0):N(0)}).attr("height",0).remove(),H.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return p(e,t)}).style("stroke",function(e,t){return p(e,t)}),H.transition().style("stroke-opacity",1).style("fill-opacity",.75);var B=H.selectAll("rect.nv-bar").data(function(t){return d&&!e.length?d.values:t.values});B.exit().remove();var j=B.enter().append("rect").attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(t,n,r){return c?0:r*i.rangeBand()/e.length}).attr("y",function(e){return N(c?e.y0:0)}).attr("height",0).attr("width",i.rangeBand()/(c?1:e.length)).attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});B.style("fill",function(e,t,n){return p(e,n,t)}).style("stroke",function(e,t,n){return p(e,n,t)}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),x.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),x.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){x.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length -,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(t,n){x.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}),B.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).transition().attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"}),v&&(m||(m=e.map(function(){return!0})),B.style("fill",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()})),c?B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e,t){return s(c?e.y1:0)}).attr("height",function(e,t){return Math.max(Math.abs(s(e.y+(c?e.y0:0))-s(c?e.y0:0)),1)}).attr("x",function(t,n){return c?0:t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/(c?1:e.length)):B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("x",function(t,n){return t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/e.length).attr("y",function(e,t){return a(e,t)<0?s(0):s(0)-s(a(e,t))<1?s(0)-1:s(a(e,t))||0}).attr("height",function(e,t){return Math.max(Math.abs(s(a(e,t))-s(0)),1)||0}),T=i.copy(),N=s.copy()}),C}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=d3.scale.ordinal(),s=d3.scale.linear(),o=Math.floor(Math.random()*1e4),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=!0,c=!1,h="zero",p=e.utils.defaultColor(),d=!1,v=null,m,g=1200,y,b,w,E,S=.1,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),T,N;return C.dispatch=x,C.options=e.utils.optionsFunc.bind(C),C.x=function(e){return arguments.length?(u=e,C):u},C.y=function(e){return arguments.length?(a=e,C):a},C.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,C):t},C.width=function(e){return arguments.length?(n=e,C):n},C.height=function(e){return arguments.length?(r=e,C):r},C.xScale=function(e){return arguments.length?(i=e,C):i},C.yScale=function(e){return arguments.length?(s=e,C):s},C.xDomain=function(e){return arguments.length?(y=e,C):y},C.yDomain=function(e){return arguments.length?(b=e,C):b},C.xRange=function(e){return arguments.length?(w=e,C):w},C.yRange=function(e){return arguments.length?(E=e,C):E},C.forceY=function(e){return arguments.length?(f=e,C):f},C.stacked=function(e){return arguments.length?(c=e,C):c},C.stackOffset=function(e){return arguments.length?(h=e,C):h},C.clipEdge=function(e){return arguments.length?(l=e,C):l},C.color=function(t){return arguments.length?(p=e.utils.getColor(t),C):p},C.barColor=function(t){return arguments.length?(v=e.utils.getColor(t),C):v},C.disabled=function(e){return arguments.length?(m=e,C):m},C.id=function(e){return arguments.length?(o=e,C):o},C.hideable=function(e){return arguments.length?(d=e,C):d},C.delay=function(e){return arguments.length?(g=e,C):g},C.groupSpacing=function(e){return arguments.length?(S=e,C):S},C},e.models.multiBarChart=function(){"use strict";function A(e){return e.each(function(e){var b=d3.select(this),O=this,M=(u||parseInt(b.style("width"))||960)-o.left-o.right,_=(a||parseInt(b.style("height"))||400)-o.top-o.bottom;A.update=function(){b.transition().duration(k).call(A)},A.container=this,S.disabled=e.map(function(e){return!!e.disabled});if(!x){var D;x={};for(D in S)S[D]instanceof Array?x[D]=S[D].slice(0):x[D]=S[D]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var P=b.selectAll(".nv-noData").data([T]);return P.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),P.attr("x",o.left+M/2).attr("y",o.top+_/2).text(function(e){return e}),A}b.selectAll(".nv-noData").remove(),w=t.xScale(),E=t.yScale();var H=b.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([e]),B=H.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),j=H.select("g");B.append("g").attr("class","nv-x nv-axis"),B.append("g").attr("class","nv-y nv-axis"),B.append("g").attr("class","nv-barsWrap"),B.append("g").attr("class","nv-legendWrap"),B.append("g").attr("class","nv-controlsWrap"),c&&(i.width(M-C()),t.barColor()&&e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()}),j.select(".nv-legendWrap").datum(e).call(i),o.top!=i.height()&&(o.top=i.height(),_=(a||parseInt(b.style("height"))||400)-o.top-o.bottom),j.select(".nv-legendWrap").attr("transform","translate("+C()+","+ -o.top+")"));if(l){var F=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(C()).color(["#444","#444","#444"]),j.select(".nv-controlsWrap").datum(F).attr("transform","translate(0,"+ -o.top+")").call(s)}H.attr("transform","translate("+o.left+","+o.top+")"),d&&j.select(".nv-y.nv-axis").attr("transform","translate("+M+",0)"),t.disabled(e.map(function(e){return e.disabled})).width(M).height(_).color(e.map(function(e,t){return e.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));var I=j.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));I.transition().call(t);if(h){n.scale(w).ticks(M/100).tickSize(-_,0),j.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")"),j.select(".nv-x.nv-axis").transition().call(n);var q=j.select(".nv-x.nv-axis > g").selectAll("g");q.selectAll("line, text").style("opacity",1);if(m){var R=function(e,t){return"translate("+e+","+t+")"},U=5,z=17;q.selectAll("text").attr("transform",function(e,t,n){return R(0,n%2==0?U:z)});var W=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;j.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(e,t){return R(0,t===0||W%2!==0?z:U)})}v&&q.filter(function(t,n){return n%Math.ceil(e[0].values.length/(M/100))!==0}).selectAll("text, line").style("opacity",0),g&&q.selectAll(".tick text").attr("transform","rotate("+g+" 0,0)").style("text-anchor",g>0?"start":"end"),j.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}p&&(r.scale(E).ticks(_/36).tickSize(-M,0),j.select(".nv-y.nv-axis").transition().call(r)),i.dispatch.on("stateChange",function(e){S=e,N.stateChange(S),A.update()}),s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;F=F.map(function(e){return e.disabled=!0,e}),e.disabled=!1;switch(e.key){case"Grouped":t.stacked(!1);break;case"Stacked":t.stacked(!0)}S.stacked=t.stacked(),N.stateChange(S),A.update()}),N.on("tooltipShow",function(e){y&&L(e,O.parentNode)}),N.on("changeState",function(n){typeof n.disabled!="undefined"&&(e.forEach(function(e,t){e.disabled=n.disabled[t]}),S.disabled=n.disabled),typeof n.stacked!="undefined"&&(t.stacked(n.stacked),S.stacked=n.stacked),A.update()})}),A}var t=e.models.multiBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=!0,c=!0,h=!0,p=!0,d=!1,v=!0,m=!1,g=0,y=!0,b=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" on "+t+"

"},w,E,S={stacked:!1},x=null,T="No Data Available.",N=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),C=function(){return l?180:0},k=250;t.stacked(!1),n.orient("bottom").tickPadding(7).highlightZero(!0).showMaxMin(!1).tickFormat(function(e){return e}),r.orient(d?"right":"left").tickFormat(d3.format(",.1f")),s.updateState(!1);var L=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,A);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top],N.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){N.tooltipHide(e)}),N.on("tooltipHide",function(){y&&e.tooltip.cleanup()}),A.dispatch=N,A.multibar=t,A.legend=i,A.xAxis=n,A.yAxis=r,d3.rebind(A,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","stacked","stackOffset","delay","barColor","groupSpacing"),A.options=e.utils.optionsFunc.bind(A),A.margin=function(e){return arguments.length?(o.top=typeof e.top!="undefined"?e.top:o.top,o.right=typeof e.right!="undefined"?e.right:o.right,o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom,o.left=typeof e.left!="undefined"?e.left:o.left,A):o},A.width=function(e){return arguments.length?(u=e,A):u},A.height=function(e){return arguments.length?(a=e,A):a},A.color=function(t){return arguments.length?(f=e.utils.getColor(t),i.color(f),A):f},A.showControls=function(e){return arguments.length?(l=e,A):l},A.showLegend=function(e){return arguments.length?(c=e,A):c},A.showXAxis=function(e){return arguments.length?(h=e,A):h},A.showYAxis=function(e){return arguments.length?(p=e,A):p},A.rightAlignYAxis=function(e){return arguments.length?(d=e,r.orient(e?"right":"left"),A):d},A.reduceXTicks=function(e){return arguments.length?(v=e,A):v},A.rotateLabels=function(e){return arguments.length?(g=e,A):g},A.staggerLabels=function(e){return arguments.length?(m=e,A):m},A.tooltip=function(e){return arguments.length?(b=e,A):b},A.tooltips=function(e){return arguments.length?(y=e,A):y},A.tooltipContent=function(e){return arguments.length?(b=e,A):b},A.state=function(e){return arguments.length?(S=e,A):S},A.defaultState=function(e){return arguments.length?(x=e,A):x},A.noData=function(e){return arguments.length?(T=e,A):T},A.transitionDuration=function(e){return arguments.length?(k=e,A):k},A},e.models.multiBarHorizontal=function(){"use strict";function C(e){return e.each(function(e){var i=n-t.left-t.right,y=r-t.top-t.bottom,C=d3.select(this);p&&(e=d3.layout.stack().offset("zero").values(function(e){return e.values}).y(a)(e)),e.forEach(function(e,t){e.values.forEach(function(e){e.series=t})}),p&&e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y),t.y<0?(t.y1=i-t.size,i-=t.size):(t.y1=r,r+=t.size)})});var k=b&&w?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});s.domain(b||d3.merge(k).map(function(e){return e.x})).rangeBands(E||[0,y],.1),o.domain(w||d3.extent(d3.merge(k).map(function(e){return p?e.y>0?e.y1+e.y:e.y1:e.y}).concat(f))),d&&!p?o.range(S||[o.domain()[0]<0?m:0,i-(o.domain()[1]>0?m:0)]):o.range(S||[0,i]),T=T||s,N=N||d3.scale.linear().domain(o.domain()).range([o(0),o(0)]);var L=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([e]),A=L.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),O=A.append("defs"),M=A.append("g"),_=L.select("g");M.append("g").attr("class","nv-groups"),L.attr("transform","translate("+t.left+","+t.top+")");var D=L.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});D.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),D.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),D.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return l(e,t)}).style("stroke",function(e,t){return l(e,t)}),D.transition().style("stroke-opacity",1).style("fill-opacity",.75);var P=D.selectAll("g.nv-bar").data(function(e){return e.values});P.exit().remove();var H=P.enter().append("g").attr("transform",function(t,n,r){return"translate("+N(p?t.y0:0)+","+(p?0:r*s.rangeBand()/e.length+s(u(t,n)))+")"});H.append("rect").attr("width",0).attr("height",s.rangeBand()/(p?1:e.length)),P.on("mouseover",function(t,n){d3.select(this).classed("hover",!0),x.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[o(a(t,n)+(p?t.y0:0)),s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),x.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){x.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(t,n){x.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}),H.append("text"),d&&!p?(P.select("text").attr("text-anchor",function(e,t){return a(e,t)<0?"end":"start"}).attr("y",s.rangeBand()/(e.length*2)).attr("dy",".32em").text(function(e,t){return g(a(e,t))}),P.transition().select("text").attr("x",function(e,t){return a(e,t)<0?-4:o(a(e,t))-o(0)+4})):P.selectAll("text").text(""),v&&!p?(H.append("text").classed("nv-bar-label",!0),P.select("text.nv-bar-label").attr("text-anchor",function(e,t){return a(e,t)<0?"start":"end"}).attr("y",s.rangeBand()/(e.length*2)).attr("dy",".32em").text(function(e,t){return u(e,t)}),P.transition().select("text.nv-bar-label").attr("x",function(e,t){return a(e,t)<0?o(0)-o(a(e,t))+4:-4})):P.selectAll("text.nv-bar-label").text(""),P.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}),c&&(h||(h=e.map(function(){return!0})),P.style("fill",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()})),p?P.transition().attr("transform",function(e,t){return"translate("+o(e.y1)+","+s(u(e,t))+")"}).select("rect").attr("width",function(e,t){return Math.abs(o(a(e,t)+e.y0)-o(e.y0))}).attr("height",s.rangeBand()):P.transition().attr("transform",function(t,n){return"translate("+(a(t,n)<0?o(a(t,n)):o(0))+","+(t.series*s.rangeBand()/e.length+s(u(t,n)))+")"}).select("rect").attr("height",s.rangeBand()/e.length).attr("width",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(0)),1)}),T=s.copy(),N=o.copy()}),C}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=null,h,p=!1,d=!1,v=!1,m=60,g=d3.format(",.2f"),y=1200,b,w,E,S,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),T,N;return C.dispatch=x,C.options=e.utils.optionsFunc.bind(C),C.x=function(e){return arguments.length?(u=e,C):u},C.y=function(e){return arguments.length?(a=e,C):a},C.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,C):t},C.width=function(e){return arguments.length?(n=e,C):n},C.height=function(e){return arguments.length?(r=e,C):r},C.xScale=function(e){return arguments.length?(s=e,C):s},C.yScale=function(e){return arguments.length?(o=e,C):o},C.xDomain=function(e){return arguments.length?(b=e,C):b},C.yDomain=function(e){return arguments.length?(w=e,C):w},C.xRange=function(e){return arguments.length?(E=e,C):E},C.yRange=function(e){return arguments.length?(S=e,C):S},C.forceY=function(e){return arguments.length?(f=e,C):f},C.stacked=function(e){return arguments.length?(p=e,C):p},C.color=function(t){return arguments.length?(l=e.utils.getColor(t),C):l},C.barColor=function(t){return arguments.length?(c=e.utils.getColor(t),C):c},C.disabled=function(e){return arguments.length?(h=e,C):h},C.id=function(e){return arguments.length?(i=e,C):i},C.delay=function(e){return arguments.length?(y=e,C):y},C.showValues=function(e){return arguments.length?(d=e,C):d},C.showBarLabels=function(e){return arguments.length?(v=e,C):v},C.valueFormat=function(e){return arguments.length?(g=e,C):g},C.valuePadding=function(e){return arguments.length?(m=e,C):m},C},e.models.multiBarHorizontalChart=function(){"use strict";function C(e){return e.each(function(e){var d=d3.select(this),m=this,k=(u||parseInt(d.style("width"))||960)-o.left-o.right,L=(a||parseInt(d.style("height"))||400)-o.top-o.bottom;C.update=function(){d.transition().duration(T).call(C)},C.container=this,b.disabled=e.map(function(e){return!!e.disabled});if(!w){var A;w={};for(A in b)b[A]instanceof Array?w[A]=b[A].slice(0):w[A]=b[A]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var O=d.selectAll(".nv-noData").data([E]);return O.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),O.attr("x",o.left+k/2).attr("y",o.top+L/2).text(function(e){return e}),C}d.selectAll(".nv-noData").remove(),g=t.xScale(),y=t.yScale();var M=d.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([e]),_=M.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),D=M.select("g");_.append("g").attr("class","nv-x nv-axis"),_.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),_.append("g").attr("class","nv-barsWrap"),_.append("g").attr("class","nv-legendWrap"),_.append("g").attr("class","nv-controlsWrap"),c&&(i.width(k-x()),t.barColor()&&e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()}),D.select(".nv-legendWrap").datum(e).call(i),o.top!=i.height()&&(o.top=i.height(),L=(a||parseInt(d.style("height"))||400)-o.top-o.bottom),D.select(".nv-legendWrap").attr("transform","translate("+x()+","+ -o.top+")"));if(l){var P=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(x()).color(["#444","#444","#444"]),D.select(".nv-controlsWrap").datum(P).attr("transform","translate(0,"+ -o.top+")").call(s)}M.attr("transform","translate("+o.left+","+o.top+")"),t.disabled(e.map(function(e){return e.disabled})).width(k).height(L).color(e.map(function(e,t){return e.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));var H=D.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));H.transition().call(t);if(h){n.scale(g).ticks(L/24).tickSize(-k,0),D.select(".nv-x.nv-axis").transition().call(n);var B=D.select(".nv-x.nv-axis").selectAll("g");B.selectAll("line, text")}p&&(r.scale(y).ticks(k/100).tickSize(-L,0),D.select(".nv-y.nv-axis").attr("transform","translate(0,"+L+")"),D.select(".nv-y.nv-axis").transition().call(r)),D.select(".nv-zeroLine line").attr("x1",y(0)).attr("x2",y(0)).attr("y1",0).attr("y2",-L),i.dispatch.on("stateChange",function(e){b=e,S.stateChange(b),C.update()}),s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;P=P.map(function(e){return e.disabled=!0,e}),e.disabled=!1;switch(e.key){case"Grouped":t.stacked(!1);break;case"Stacked":t.stacked(!0)}b.stacked=t.stacked(),S.stateChange(b),C.update()}),S.on("tooltipShow",function(e){v&&N(e,m.parentNode)}),S.on("changeState",function(n){typeof n.disabled!="undefined"&&(e.forEach(function(e,t){e.disabled=n.disabled[t]}),b.disabled=n.disabled),typeof n.stacked!="undefined"&&(t.stacked(n.stacked),b.stacked=n.stacked),C.update()})}),C}var t=e.models.multiBarHorizontal(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend().height(30),s=e.models.legend().height(30),o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=!0,c=!0,h=!0,p=!0,d=!1,v=!0,m=function(e,t,n,r,i){return"

"+e+" - "+t+"

"+"

"+n+"

"},g,y,b={stacked:d},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=function(){return l?180:0},T=250;t.stacked(d),n.orient("left").tickPadding(5).highlightZero(!1).showMaxMin(!1).tickFormat(function(e){return e}),r.orient("bottom").tickFormat(d3.format(",.1f")),s.updateState(!1);var N=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,C);e.tooltip.show([o,u],l,i.value<0?"e":"w",null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top],S.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),S.on("tooltipHide",function(){v&&e.tooltip.cleanup()}),C.dispatch=S,C.multibar=t,C.legend=i,C.xAxis=n,C.yAxis=r,d3.rebind(C,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","delay","showValues","showBarLabels","valueFormat","stacked","barColor"),C.options=e.utils.optionsFunc.bind(C),C.margin=function(e){return arguments.length?(o.top=typeof e.top!="undefined"?e.top:o.top,o.right=typeof e.right!="undefined"?e.right:o.right,o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom,o.left=typeof e.left!="undefined"?e.left:o.left,C):o},C.width=function(e){return arguments.length?(u=e,C):u},C.height=function(e){return arguments.length?(a=e,C):a},C.color=function(t){return arguments.length?(f=e.utils.getColor(t),i.color(f),C):f},C.showControls=function(e){return arguments.length?(l=e,C):l},C.showLegend=function(e){return arguments.length?(c=e,C):c},C.showXAxis=function(e){return arguments.length?(h=e,C):h},C.showYAxis=function(e){return arguments.length?(p=e,C):p},C.tooltip=function(e){return arguments.length?(m=e,C):m},C.tooltips=function(e){return arguments.length?(v=e,C):v},C.tooltipContent=function(e){return arguments.length?(m=e,C):m},C.state=function(e){return arguments.length?(b=e,C):b},C.defaultState=function(e){return arguments.length?(w=e,C):w},C.noData=function(e){return arguments.length?(E=e,C):E},C.transitionDuration=function(e){return arguments.length?(T=e,C):T},C},e.models.multiChart=function(){"use strict";function C(e){return e.each(function(e){var u=d3.select(this),f=this;C.update=function(){u.transition().call(C)},C.container=this;var k=(r||parseInt(u.style("width"))||960)-t.left-t.right,L=(i||parseInt(u.style("height"))||400)-t.top-t.bottom,A=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==1}),O=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==2}),M=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==1}),_=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==2}),D=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==1}),P=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==2}),H=e.filter(function(e){return!e.disabled&&e.yAxis==1}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})}),B=e.filter(function(e){return!e.disabled&&e.yAxis==2}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});a.domain(d3.extent(d3.merge(H.concat(B)),function(e){return e.x})).range([0,k]);var j=u.selectAll("g.wrap.multiChart").data([e]),F=j.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");F.append("g").attr("class","x axis"),F.append("g").attr("class","y1 axis"),F.append("g").attr("class","y2 axis"),F.append("g").attr("class","lines1Wrap"),F.append("g").attr("class","lines2Wrap"),F.append("g").attr("class","bars1Wrap"),F.append("g").attr("class","bars2Wrap"),F.append("g").attr("class","stack1Wrap"),F.append("g").attr("class","stack2Wrap"),F.append("g").attr("class","legendWrap");var I=j.select("g");s&&(x.width(k/2),I.select(".legendWrap").datum(e.map(function(e){return e.originalKey=e.originalKey===undefined?e.key:e.originalKey,e.key=e.originalKey+(e.yAxis==1?"":" (right axis)"),e})).call(x),t.top!=x.height()&&(t.top=x.height(),L=(i||parseInt(u.style("height"))||400)-t.top-t.bottom),I.select(".legendWrap").attr("transform","translate("+k/2+","+ -t.top+")")),d.width(k).height(L).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="line"})),v.width(k).height(L).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="line"})),m.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="bar"})),g.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="bar"})),y.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="area"})),b.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="area"})),I.attr("transform","translate("+t.left+","+t.top+")");var q=I.select(".lines1Wrap").datum(A),R=I.select(".bars1Wrap").datum(M),U=I.select(".stack1Wrap").datum(D),z=I.select(".lines2Wrap").datum(O),W=I.select(".bars2Wrap").datum(_),X=I.select(".stack2Wrap").datum(P),V=D.length?D.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[],$=P.length?P.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];h.domain(l||d3.extent(d3.merge(H).concat(V),function(e){return e.y})).range([0,L]),p.domain(c||d3.extent(d3.merge(B).concat($),function(e){return e.y})).range([0,L]),d.yDomain(h.domain()),m.yDomain(h.domain()),y.yDomain(h.domain()),v.yDomain(p.domain()),g.yDomain(p.domain()),b.yDomain(p.domain()),D.length&&d3.transition(U).call(y),P.length&&d3.transition(X).call(b),M.length&&d3.transition(R).call(m),_.length&&d3.transition(W).call(g),A.length&&d3.transition(q).call(d),O.length&&d3.transition(z).call(v),w.ticks(k/100).tickSize(-L,0),I.select(".x.axis").attr("transform","translate(0,"+L+")"),d3.transition(I.select(".x.axis")).call(w),E.ticks(L/36).tickSize(-k,0),d3.transition(I.select(".y1.axis")).call(E),S.ticks(L/36).tickSize(-k,0),d3.transition(I.select(".y2.axis")).call(S),I.select(".y2.axis").style("opacity",B.length?1:0).attr("transform","translate("+a.range()[1]+",0)"),x.dispatch.on("stateChange",function(e){C.update()}),T.on("tooltipShow",function(e){o&&N(e,f.parentNode)})}),C}var t={top:30,right:20,bottom:50,left:60},n=d3.scale.category20().range(),r=null,i=null,s=!0,o=!0,u=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" at "+t+"

"},a,f,l,c,a=d3.scale.linear(),h=d3.scale.linear(),p=d3.scale.linear(),d=e.models.line().yScale(h),v=e.models.line().yScale(p),m=e.models.multiBar().stacked(!1).yScale(h),g=e.models.multiBar().stacked(!1).yScale(p),y=e.models.stackedArea().yScale(h),b=e.models.stackedArea().yScale(p),w=e.models.axis().scale(a).orient("bottom").tickPadding(5),E=e.models.axis().scale(h).orient("left"),S=e.models.axis().scale(p).orient("right"),x=e.models.legend().height(30),T=d3.dispatch("tooltipShow","tooltipHide"),N=function(t,n){var r=t.pos[0]+(n.offsetLeft||0),i=t.pos[1]+(n.offsetTop||0),s=w.tickFormat()(d.x()(t.point,t.pointIndex)),o=(t.series.yAxis==2?S:E).tickFormat()(d.y()(t.point,t.pointIndex)),a=u(t.series.key,s,o,t,C);e.tooltip.show([r,i],a,undefined,undefined,n.offsetParent)};return d.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),d.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),v.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),v.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),m.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),g.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),y.dispatch.on("tooltipShow",function(e){if(!Math.round(y.y()(e.point)*100))return setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1;e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),y.dispatch.on("tooltipHide",function(e){T.tooltipHide(e)}),b.dispatch.on("tooltipShow",function(e){if(!Math.round(b.y()(e.point)*100))return setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1;e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),b.dispatch.on("tooltipHide",function(e){T.tooltipHide(e)}),d.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),d.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),v.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),v.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),T.on("tooltipHide",function(){o&&e.tooltip.cleanup()}),C.dispatch=T,C.lines1=d,C.lines2=v,C.bars1=m,C.bars2=g,C.stack1=y,C.stack2=b,C.xAxis=w,C.yAxis1=E,C.yAxis2=S,C.options=e.utils.optionsFunc.bind(C),C.x=function(e){return arguments.length?(getX=e,d.x(e),m.x(e),C):getX},C.y=function(e){return arguments.length?(getY=e,d.y(e),m.y(e),C):getY},C.yDomain1=function(e){return arguments.length?(l=e,C):l},C.yDomain2=function(e){return arguments.length?(c=e,C):c},C.margin=function(e){return arguments.length?(t=e,C):t},C.width=function(e){return arguments.length?(r=e,C):r},C.height=function(e){return arguments.length?(i=e,C):i},C.color=function(e){return arguments.length?(n=e,x.color(e),C):n},C.showLegend=function(e){return arguments.length?(s=e,C):s},C.tooltips=function(e){return arguments.length?(o=e,C):o},C.tooltipContent=function(e){return arguments.length?(u=e,C):u},C},e.models.ohlcBar=function(){"use strict";function x(e){return e.each(function(e){var g=n-t.left-t.right,x=r-t.top-t.bottom,T=d3.select(this);s.domain(y||d3.extent(e[0].values.map(u).concat(p))),v?s.range(w||[g*.5/e[0].values.length,g*(e[0].values.length-.5)/e[0].values.length]):s.range(w||[0,g]),o.domain(b||[d3.min(e[0].values.map(h).concat(d)),d3.max(e[0].values.map(c).concat(d))]).range(E||[x,0]),s.domain()[0]===s.domain()[1]&&(s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1])),o.domain()[0]===o.domain()[1]&&(o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]));var N=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([e[0].values]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),k=C.append("defs"),L=C.append("g"),A=N.select("g");L.append("g").attr("class","nv-ticks"),N.attr("transform","translate("+t.left+","+t.top+")"),T.on("click",function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:i})}),k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect"),N.select("#nv-chart-clip-path-"+i+" rect").attr("width",g).attr("height",x),A.attr("clip-path",m?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-ticks").selectAll(".nv-tick").data(function(e){return e});O.exit().remove();var M=O.enter().append("path").attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"}).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),S.elementMouseover({point:t,series:e[0],pos:[s(u(t,n)),o(a(t,n))],pointIndex:n,seriesIndex:0,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),S.elementMouseout({point:t,series:e[0],pointIndex:n,seriesIndex:0,e:d3.event})}).on("click",function(e,t){S.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()}).on("dblclick",function(e,t){S.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()});O.attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}),d3.transition(O).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"})}),x}var t={top:0 -,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=function(e){return e.open},l=function(e){return e.close},c=function(e){return e.high},h=function(e){return e.low},p=[],d=[],v=!1,m=!0,g=e.utils.defaultColor(),y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return x.dispatch=S,x.options=e.utils.optionsFunc.bind(x),x.x=function(e){return arguments.length?(u=e,x):u},x.y=function(e){return arguments.length?(a=e,x):a},x.open=function(e){return arguments.length?(f=e,x):f},x.close=function(e){return arguments.length?(l=e,x):l},x.high=function(e){return arguments.length?(c=e,x):c},x.low=function(e){return arguments.length?(h=e,x):h},x.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,x):t},x.width=function(e){return arguments.length?(n=e,x):n},x.height=function(e){return arguments.length?(r=e,x):r},x.xScale=function(e){return arguments.length?(s=e,x):s},x.yScale=function(e){return arguments.length?(o=e,x):o},x.xDomain=function(e){return arguments.length?(y=e,x):y},x.yDomain=function(e){return arguments.length?(b=e,x):b},x.xRange=function(e){return arguments.length?(w=e,x):w},x.yRange=function(e){return arguments.length?(E=e,x):E},x.forceX=function(e){return arguments.length?(p=e,x):p},x.forceY=function(e){return arguments.length?(d=e,x):d},x.padData=function(e){return arguments.length?(v=e,x):v},x.clipEdge=function(e){return arguments.length?(m=e,x):m},x.color=function(t){return arguments.length?(g=e.utils.getColor(t),x):g},x.id=function(e){return arguments.length?(i=e,x):i},x},e.models.pie=function(){"use strict";function S(e){return e.each(function(e){function q(e){var t=(e.startAngle+e.endAngle)*90/Math.PI-90;return t>90?t-180:t}function R(e){e.endAngle=isNaN(e.endAngle)?0:e.endAngle,e.startAngle=isNaN(e.startAngle)?0:e.startAngle,m||(e.innerRadius=0);var t=d3.interpolate(this._current,e);return this._current=t(0),function(e){return A(t(e))}}function U(e){e.innerRadius=0;var t=d3.interpolate({startAngle:0,endAngle:0},e);return function(e){return A(t(e))}}var o=n-t.left-t.right,f=r-t.top-t.bottom,S=Math.min(o,f)/2,x=S-S/5,T=d3.select(this),N=T.selectAll(".nv-wrap.nv-pie").data(e),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+u),k=C.append("g"),L=N.select("g");k.append("g").attr("class","nv-pie"),k.append("g").attr("class","nv-pieLabels"),N.attr("transform","translate("+t.left+","+t.top+")"),L.select(".nv-pie").attr("transform","translate("+o/2+","+f/2+")"),L.select(".nv-pieLabels").attr("transform","translate("+o/2+","+f/2+")"),T.on("click",function(e,t){E.chartClick({data:e,index:t,pos:d3.event,id:u})});var A=d3.svg.arc().outerRadius(x);y&&A.startAngle(y),b&&A.endAngle(b),m&&A.innerRadius(S*w);var O=d3.layout.pie().sort(null).value(function(e){return e.disabled?0:s(e)}),M=N.select(".nv-pie").selectAll(".nv-slice").data(O),_=N.select(".nv-pieLabels").selectAll(".nv-label").data(O);M.exit().remove(),_.exit().remove();var D=M.enter().append("g").attr("class","nv-slice").on("mouseover",function(e,t){d3.select(this).classed("hover",!0),E.elementMouseover({label:i(e.data),value:s(e.data),point:e.data,pointIndex:t,pos:[d3.event.pageX,d3.event.pageY],id:u})}).on("mouseout",function(e,t){d3.select(this).classed("hover",!1),E.elementMouseout({label:i(e.data),value:s(e.data),point:e.data,index:t,id:u})}).on("click",function(e,t){E.elementClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u}),d3.event.stopPropagation()}).on("dblclick",function(e,t){E.elementDblClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u}),d3.event.stopPropagation()});M.attr("fill",function(e,t){return a(e,t)}).attr("stroke",function(e,t){return a(e,t)});var P=D.append("path").each(function(e){this._current=e});M.select("path").transition().attr("d",A).attrTween("d",R);if(l){var H=d3.svg.arc().innerRadius(0);c&&(H=A),h&&(H=d3.svg.arc().outerRadius(A.outerRadius())),_.enter().append("g").classed("nv-label",!0).each(function(e,t){var n=d3.select(this);n.attr("transform",function(e){if(g){e.outerRadius=x+10,e.innerRadius=x+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);return(e.startAngle+e.endAngle)/2v?r[p]:""})}}),S}var t={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){return e.x},s=function(e){return e.y},o=function(e){return e.description},u=Math.floor(Math.random()*1e4),a=e.utils.defaultColor(),f=d3.format(",.2f"),l=!0,c=!0,h=!1,p="key",v=.02,m=!1,g=!1,y=!1,b=!1,w=.5,E=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return S.dispatch=E,S.options=e.utils.optionsFunc.bind(S),S.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,S):t},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.values=function(t){return e.log("pie.values() is no longer supported."),S},S.x=function(e){return arguments.length?(i=e,S):i},S.y=function(e){return arguments.length?(s=d3.functor(e),S):s},S.description=function(e){return arguments.length?(o=e,S):o},S.showLabels=function(e){return arguments.length?(l=e,S):l},S.labelSunbeamLayout=function(e){return arguments.length?(g=e,S):g},S.donutLabelsOutside=function(e){return arguments.length?(h=e,S):h},S.pieLabelsOutside=function(e){return arguments.length?(c=e,S):c},S.labelType=function(e){return arguments.length?(p=e,p=p||"key",S):p},S.donut=function(e){return arguments.length?(m=e,S):m},S.donutRatio=function(e){return arguments.length?(w=e,S):w},S.startAngle=function(e){return arguments.length?(y=e,S):y},S.endAngle=function(e){return arguments.length?(b=e,S):b},S.id=function(e){return arguments.length?(u=e,S):u},S.color=function(t){return arguments.length?(a=e.utils.getColor(t),S):a},S.valueFormat=function(e){return arguments.length?(f=e,S):f},S.labelThreshold=function(e){return arguments.length?(v=e,S):v},S},e.models.pieChart=function(){"use strict";function v(e){return e.each(function(e){var u=d3.select(this),a=this,f=(i||parseInt(u.style("width"))||960)-r.left-r.right,d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom;v.update=function(){u.transition().call(v)},v.container=this,l.disabled=e.map(function(e){return!!e.disabled});if(!c){var m;c={};for(m in l)l[m]instanceof Array?c[m]=l[m].slice(0):c[m]=l[m]}if(!e||!e.length){var g=u.selectAll(".nv-noData").data([h]);return g.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),g.attr("x",r.left+f/2).attr("y",r.top+d/2).text(function(e){return e}),v}u.selectAll(".nv-noData").remove();var y=u.selectAll("g.nv-wrap.nv-pieChart").data([e]),b=y.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),w=y.select("g");b.append("g").attr("class","nv-pieWrap"),b.append("g").attr("class","nv-legendWrap"),o&&(n.width(f).key(t.x()),y.select(".nv-legendWrap").datum(e).call(n),r.top!=n.height()&&(r.top=n.height(),d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom),y.select(".nv-legendWrap").attr("transform","translate(0,"+ -r.top+")")),y.attr("transform","translate("+r.left+","+r.top+")"),t.width(f).height(d);var E=w.select(".nv-pieWrap").datum([e]);d3.transition(E).call(t),n.dispatch.on("stateChange",function(e){l=e,p.stateChange(l),v.update()}),t.dispatch.on("elementMouseout.tooltip",function(e){p.tooltipHide(e)}),p.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),l.disabled=t.disabled),v.update()})}),v}var t=e.models.pie(),n=e.models.legend(),r={top:30,right:20,bottom:20,left:20},i=null,s=null,o=!0,u=e.utils.defaultColor(),a=!0,f=function(e,t,n,r){return"

"+e+"

"+"

"+t+"

"},l={},c=null,h="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),d=function(n,r){var i=t.description()(n.point)||t.x()(n.point),s=n.pos[0]+(r&&r.offsetLeft||0),o=n.pos[1]+(r&&r.offsetTop||0),u=t.valueFormat()(t.y()(n.point)),a=f(i,u,n,v);e.tooltip.show([s,o],a,n.value<0?"n":"s",null,r)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+r.left,e.pos[1]+r.top],p.tooltipShow(e)}),p.on("tooltipShow",function(e){a&&d(e)}),p.on("tooltipHide",function(){a&&e.tooltip.cleanup()}),v.legend=n,v.dispatch=p,v.pie=t,d3.rebind(v,t,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","labelType","donut","donutRatio","labelThreshold"),v.options=e.utils.optionsFunc.bind(v),v.margin=function(e){return arguments.length?(r.top=typeof e.top!="undefined"?e.top:r.top,r.right=typeof e.right!="undefined"?e.right:r.right,r.bottom=typeof e.bottom!="undefined"?e.bottom:r.bottom,r.left=typeof e.left!="undefined"?e.left:r.left,v):r},v.width=function(e){return arguments.length?(i=e,v):i},v.height=function(e){return arguments.length?(s=e,v):s},v.color=function(r){return arguments.length?(u=e.utils.getColor(r),n.color(u),t.color(u),v):u},v.showLegend=function(e){return arguments.length?(o=e,v):o},v.tooltips=function(e){return arguments.length?(a=e,v):a},v.tooltipContent=function(e){return arguments.length?(f=e,v):f},v.state=function(e){return arguments.length?(l=e,v):l},v.defaultState=function(e){return arguments.length?(c=e,v):c},v.noData=function(e){return arguments.length?(h=e,v):h},v},e.models.scatter=function(){"use strict";function I(q){return q.each(function(I){function Q(){if(!g)return!1;var e,i=d3.merge(I.map(function(e,t){return e.values.map(function(e,n){var r=f(e,n),i=l(e,n);return[o(r)+Math.random()*1e-7,u(i)+Math.random()*1e-7,t,n,e]}).filter(function(e,t){return b(e[4],t)})}));if(D===!0){if(x){var a=X.select("defs").selectAll(".nv-point-clips").data([s]).enter();a.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+s);var c=X.select("#nv-points-clip-"+s).selectAll("circle").data(i);c.enter().append("circle").attr("r",T),c.exit().remove(),c.attr("cx",function(e){return e[0]}).attr("cy",function(e){return e[1]}),X.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+s+")")}i.length&&(i.push([o.range()[0]-20,u.range()[0]-20,null,null]),i.push([o.range()[1]+20,u.range()[1]+20,null,null]),i.push([o.range()[0]-20,u.range()[0]+20,null,null]),i.push([o.range()[1]+20,u.range()[1]-20,null,null]));var h=d3.geom.polygon([[-10,-10],[-10,r+10],[n+10,r+10],[n+10,-10]]),p=d3.geom.voronoi(i).map(function(e,t){return{data:h.clip(e),series:i[t][2],point:i[t][3]}}),d=X.select(".nv-point-paths").selectAll("path").data(p);d.enter().append("path").attr("class",function(e,t){return"nv-path-"+t}),d.exit().remove(),d.attr("d",function(e){return e.data.length===0?"M 0 0":"M"+e.data.join("L")+"Z"});var v=function(e,n){if(F)return 0;var r=I[e.series];if(typeof r=="undefined")return;var i=r.values[e.point];n({point:i,series:r,pos:[o(f(i,e.point))+t.left,u(l(i,e.point))+t.top],seriesIndex:e.series,pointIndex:e.point})};d.on("click",function(e){v(e,_.elementClick)}).on("mouseover",function(e){v(e,_.elementMouseover)}).on("mouseout",function(e,t){v(e,_.elementMouseout)})}else X.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementClick({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseover",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementMouseover({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseout",function(e,t){if(F||!I[e.series])return 0;var n=I[e.series],r=n.values[t];_.elementMouseout({point:r,series:n,seriesIndex:e.series,pointIndex:t})});F=!1}var q=n-t.left-t.right,R=r-t.top-t.bottom,U=d3.select(this);I.forEach(function(e,t){e.values.forEach(function(e){e.series=t})});var W=N&&C&&A?[]:d3.merge(I.map(function(e){return e.values.map(function(e,t){return{x:f(e,t),y:l(e,t),size:c(e,t)}})}));o.domain(N||d3.extent(W.map(function(e){return e.x}).concat(d))),w&&I[0]?o.range(k||[(q*E+q)/(2*I[0].values.length),q-q*(1+E)/(2*I[0].values.length)]):o.range(k||[0,q]),u.domain(C||d3.extent(W.map(function(e){return e.y}).concat(v))).range(L||[R,0]),a.domain(A||d3.extent(W.map(function(e){return e.size}).concat(m))).range(O||[16,256]);if(o.domain()[0]===o.domain()[1]||u.domain()[0]===u.domain()[1])M=!0;o.domain()[0]===o.domain()[1]&&(o.domain()[0]?o.domain([o.domain()[0]-o.domain()[0]*.01,o.domain()[1]+o.domain()[1]*.01]):o.domain([-1,1])),u.domain()[0]===u.domain()[1]&&(u.domain()[0]?u.domain([u.domain()[0]-u.domain()[0]*.01,u.domain()[1]+u.domain()[1]*.01]):u.domain([-1,1])),isNaN(o.domain()[0])&&o.domain([-1,1]),isNaN(u.domain()[0])&&u.domain([-1,1]),P=P||o,H=H||u,B=B||a;var X=U.selectAll("g.nv-wrap.nv-scatter").data([I]),V=X.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+s+(M?" nv-single-point":"")),$=V.append("defs"),J=V.append("g"),K=X.select("g");J.append("g").attr("class","nv-groups"),J.append("g").attr("class","nv-point-paths"),X.attr("transform","translate("+t.left+","+t.top+")"),$.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect"),X.select("#nv-edge-clip-"+s+" rect").attr("width",q).attr("height",R>0?R:0),K.attr("clip-path",S?"url(#nv-edge-clip-"+s+")":""),F=!0;var G=X.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),G.exit().remove(),G.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}),G.transition().style("fill",function(e,t){return i(e,t)}).style("stroke",function(e,t){return i(e,t)}).style("stroke-opacity",1).style("fill-opacity",.5);if(p){var Y=G.selectAll("circle.nv-point").data(function(e){return e.values},y);Y.enter().append("circle").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("cx",function(t,n){return e.utils.NaNtoZero(P(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(H(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)}),Y.exit().remove(),G.exit().selectAll("path.nv-point").transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).remove(),Y.each(function(e,t){d3.select(this).classed("nv-point",!0).classed("nv-point-"+t,!0).classed("hover",!1)}),Y.transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)})}else{var Y=G.selectAll("path.nv-point").data(function(e){return e.values});Y.enter().append("path").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("transform",function(e,t){return"translate("+P(f(e,t))+","+H(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))})),Y.exit().remove(),G.exit().selectAll("path.nv-point").transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).remove(),Y.each(function(e,t){d3.select(this).classed("nv-point",!0).classed("nv-point-"+t,!0).classed("hover",!1)}),Y.transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}))}clearTimeout(j),j=setTimeout(Q,300),P=o.copy(),H=u.copy(),B=a.copy()}),I}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=d3.scale.linear(),u=d3.scale.linear(),a=d3.scale.linear(),f=function(e){return e.x},l=function(e){return e.y},c=function(e){return e.size||1},h=function(e){return e.shape||"circle"},p=!0,d=[],v=[],m=[],g=!0,y=null,b=function(e){return!e.notActive},w=!1,E=.1,S=!1,x=!0,T=function(){return 25},N=null,C=null,k=null,L=null,A=null,O=null,M=!1,_=d3.dispatch("elementClick","elementMouseover","elementMouseout"),D=!0,P,H,B,j,F=!1;return I.clearHighlights=function(){d3.selectAll(".nv-chart-"+s+" .nv-point.hover").classed("hover",!1)},I.highlightPoint=function(e,t,n){d3.select(".nv-chart-"+s+" .nv-series-"+e+" .nv-point-"+t).classed("hover",n)},_.on("elementMouseover.point",function(e){g&&I.highlightPoint(e.seriesIndex,e.pointIndex,!0)}),_.on("elementMouseout.point",function(e){g&&I.highlightPoint(e.seriesIndex,e.pointIndex,!1)}),I.dispatch=_,I.options=e.utils.optionsFunc.bind(I),I.x=function(e){return arguments.length?(f=d3.functor(e),I):f},I.y=function(e){return arguments.length?(l=d3.functor(e),I):l},I.size=function(e){return arguments.length?(c=d3.functor(e),I):c},I.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,I):t},I.width=function(e){return arguments.length?(n=e,I):n},I.height=function(e){return arguments.length?(r=e,I):r},I.xScale=function(e){return arguments.length?(o=e,I):o},I.yScale=function(e){return arguments.length?(u=e,I):u},I.zScale=function(e){return arguments.length?(a=e,I):a},I.xDomain=function(e){return arguments.length?(N=e,I):N},I.yDomain=function(e){return arguments.length?(C=e,I):C},I.sizeDomain=function(e){return arguments.length?(A=e,I):A},I.xRange=function(e){return arguments.length?(k=e,I):k},I.yRange=function(e){return arguments.length?(L=e,I):L},I.sizeRange=function(e){return arguments.length?(O=e,I):O},I.forceX=function(e){return arguments.length?(d=e,I):d},I.forceY=function(e){return arguments.length?(v=e,I):v},I.forceSize=function(e){return arguments.length?(m=e,I):m},I.interactive=function(e){return arguments.length?(g=e,I):g},I.pointKey=function(e){return arguments.length?(y=e,I):y},I.pointActive=function(e){return arguments.length?(b=e,I):b},I.padData=function(e){return arguments.length?(w=e,I):w},I.padDataOuter=function(e){return arguments.length?(E=e,I):E},I.clipEdge=function(e){return arguments.length?(S=e,I):S},I.clipVoronoi=function(e){return arguments.length?(x=e,I):x},I.useVoronoi=function(e){return arguments.length?(D=e,D===!1&&(x=!1),I):D},I.clipRadius=function(e){return arguments.length?(T=e,I):T},I.color=function(t){return arguments.length?(i=e.utils.getColor(t),I):i},I.shape=function(e){return arguments.length?(h=e,I):h},I.onlyCircles=function(e){return arguments.length?(p=e,I):p},I.id=function(e){return arguments.length?(s=e,I):s},I.singlePoint=function(e){return arguments.length?(M=e,I):M},I},e.models.scatterChart=function(){"use strict";function F(e){return e.each(function(e){function K(){if(T)return X.select(".nv-point-paths").style("pointer-events","all"),!1;X.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(x).focus(i[0]),p.distortion(x).focus(i[1]),X.select(".nv-scatterWrap").call(t),b&&X.select(".nv-x.nv-axis").call(n),w&&X.select(".nv-y.nv-axis").call(r),X.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o),X.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var C=d3.select(this),k=this,L=(f||parseInt(C.style("width"))||960)-a.left-a.right,I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom;F.update=function(){C.transition().duration(D).call(F)},F.container=this,A.disabled=e.map(function(e){return!!e.disabled});if(!O){var q;O={};for(q in A)A[q]instanceof Array?O[q]=A[q].slice(0):O[q]=A[q]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=C.selectAll(".nv-noData").data([_]);return R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),R.attr("x",a.left+L/2).attr("y",a.top+I/2).text(function(e){return e}),F}C.selectAll(".nv-noData").remove(),P=P||h,H=H||p;var U=C.selectAll("g.nv-wrap.nv-scatterChart").data([e]),z=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id()),W=z.append("g"),X=U.select("g");W.append("rect").attr("class","nvd3 nv-background"),W.append("g").attr("class","nv-x nv-axis"),W.append("g").attr("class","nv-y nv-axis"),W.append("g").attr("class","nv-scatterWrap"),W.append("g").attr("class","nv-distWrap"),W.append("g").attr("class","nv-legendWrap"),W.append("g").attr("class","nv-controlsWrap");if(y){var V=S?L/2:L;i.width(V),U.select(".nv-legendWrap").datum(e).call(i),a.top!=i.height()&&(a.top=i.height(),I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom),U.select(".nv-legendWrap").attr("transform","translate("+(L-V)+","+ -a.top+")")}S&&(s.width(180).color(["#444"]),X.select(".nv-controlsWrap").datum(j).attr("transform","translate(0,"+ -a.top+")").call(s)),U.attr("transform","translate("+a.left+","+a.top+")"),E&&X.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)"),t.width(L).height(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),d!==0&&t.xDomain(null),v!==0&&t.yDomain(null),U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(d!==0){var $=h.domain()[1]-h.domain()[0];t.xDomain([h.domain()[0]-d*$,h.domain()[1]+d*$])}if(v!==0){var J=p.domain()[1]-p.domain()[0];t.yDomain([p.domain()[0]-v*J,p.domain()[1]+v*J])}(v!==0||d!==0)&&U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t),b&&(n.scale(h).ticks(n.ticks()&&n.ticks().length?n.ticks():L/100).tickSize(-I,0),X.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)),w&&(r.scale(p).ticks(r.ticks()&&r.ticks().length?r.ticks():I/36).tickSize(-L,0),X.select(".nv-y.nv-axis").call(r)),m&&(o.getData(t.x()).scale(h).width(L).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),W.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),X.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)),g&&(u.getData(t.y()).scale(p).width(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),W.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),X.select(".nv-distributionY").attr("transform","translate("+(E?L:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)),d3.fisheye&&(X.select(".nv-background").attr("width",L).attr("height",I),X.select(".nv-background").on("mousemove",K),X.select(".nv-background").on("click",function(){T=!T}),t.dispatch.on("elementClick.freezeFisheye",function(){T=!T})),s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled,x=e.disabled?0:2.5,X.select(".nv-background").style("pointer-events",e.disabled?"none":"all"),X.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none"),e.disabled?(h.distortion(x).focus(0),p.distortion(x).focus(0),X.select(".nv-scatterWrap").call(t),X.select(".nv-x.nv-axis").call(n),X.select(".nv-y.nv-axis").call(r)):T=!1,F.update()}),i.dispatch.on("stateChange",function(e){A.disabled=e.disabled,M.stateChange(A),F.update()}),t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",function(t,n){return e.pos[1]-I}),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size()),e.pos=[e.pos[0]+a.left,e.pos[1]+a.top],M.tooltipShow(e)}),M.on("tooltipShow",function(e){N&&B(e,k.parentNode)}),M.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),A.disabled=t.disabled),F.update()}),P=h.copy(),H=p.copy()}),F}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution(),a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=0,v=0,m=!1,g=!1,y=!0,b=!0,w=!0,E=!1,S=!!d3.fisheye,x=0,T=!1,N=!0,C=function(e,t,n){return""+t+""},k=function(e,t,n){return""+n+""},L=null,A={},O=null,M=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),_="No Data Available.",D=250;t.xScale(h).yScale(p),n.orient("bottom").tickPadding(10),r.orient(E?"right":"left").tickPadding(10),o.axis("x"),u.axis("y"),s.updateState(!1);var P,H,B=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));C!=null&&e.tooltip.show([f,l],C(i.series.key,v,m,i,F),"n",1,s,"x-nvtooltip"),k!=null&&e.tooltip.show([c,d],k(i.series.key,v,m,i,F),"e",1,s,"y-nvtooltip"),L!=null&&e.tooltip.show([o,u],L(i.series.key,v,m,i,F),i.value<0?"n":"s",null,s)},j=[{key:"Magnify",disabled:!0}];return t.dispatch.on("elementMouseout.tooltip",function(e){M.tooltipHide(e),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())}),M.on("tooltipHide",function(){N&&e.tooltip.cleanup()}),F.dispatch=M,F.scatter=t,F.legend=i,F.controls=s,F.xAxis=n,F.yAxis=r,F.distX=o,F.distY=u,d3.rebind(F,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),F.options=e.utils.optionsFunc.bind(F),F.margin=function(e){return arguments.length?(a.top=typeof e.top!="undefined"?e.top:a.top,a.right=typeof e.right!="undefined"?e.right:a.right,a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom,a.left=typeof e.left!="undefined"?e.left:a.left,F):a},F.width=function(e){return arguments.length?(f=e,F):f},F.height=function(e){return arguments.length?(l=e,F):l},F.color=function(t){return arguments.length?(c=e.utils.getColor(t),i.color(c),o.color(c),u.color(c),F):c},F.showDistX=function(e){return arguments.length?(m=e,F):m},F.showDistY=function(e){return arguments.length?(g=e,F):g},F.showControls=function(e){return arguments.length?(S=e,F):S},F.showLegend=function(e){return arguments.length?(y=e,F):y},F.showXAxis=function(e){return arguments.length?(b=e,F):b},F.showYAxis=function(e){return arguments.length?(w=e,F):w},F.rightAlignYAxis=function(e){return arguments.length?(E=e,r.orient(e?"right":"left"),F):E},F.fisheye=function(e){return arguments.length?(x=e,F):x},F.xPadding=function(e){return arguments.length?(d=e,F):d},F.yPadding=function(e){return arguments.length?(v=e,F):v},F.tooltips=function(e){return arguments.length?(N=e,F):N},F.tooltipContent=function(e){return arguments.length?(L=e,F):L},F.tooltipXContent=function(e){return arguments.length?(C=e,F):C},F.tooltipYContent=function(e){return arguments.length?(k=e,F):k},F.state=function(e){return arguments.length?(A=e,F):A},F.defaultState=function(e){return arguments.length?(O=e,F):O},F.noData=function(e){return arguments.length?(_=e,F):_},F.transitionDuration=function(e){return arguments.length?(D=e,F):D},F},e.models.scatterPlusLineChart=function(){"use strict";function B(e){return e.each(function(e){function $(){if(S)return z.select(".nv-point-paths").style("pointer-events","all"),!1;z.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(E).focus(i[0]),p.distortion(E).focus(i[1]),z.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t),g&&z.select(".nv-x.nv-axis").call(n),y&&z.select(".nv-y.nv-axis").call(r),z.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o),z.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var T=d3.select(this),N=this,C=(f||parseInt(T.style("width"))||960)-a.left-a.right,j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom;B.update=function(){T.transition().duration(M).call(B)},B.container=this,k.disabled=e.map(function(e){return!!e.disabled});if(!L){var F;L={};for(F in k)k[F]instanceof Array?L[F]=k[F].slice(0):L[F]=k[F]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var I=T.selectAll(".nv-noData").data([O]);return I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),I.attr("x",a.left+C/2).attr("y",a.top+j/2).text(function(e){return e}),B}T.selectAll(".nv-noData").remove(),h=t.xScale(),p=t.yScale(),_=_||h,D=D||p;var q=T.selectAll("g.nv-wrap.nv-scatterChart").data([e]),R=q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id()),U=R.append("g"),z=q.select("g");U.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),U.append("g").attr("class","nv-x nv-axis"),U.append("g").attr("class","nv-y nv-axis"),U.append("g").attr("class","nv-scatterWrap"),U.append("g").attr("class","nv-regressionLinesWrap"),U.append("g").attr("class","nv-distWrap"),U.append("g").attr("class","nv-legendWrap"),U.append("g").attr("class","nv-controlsWrap"),q.attr("transform","translate("+a.left+","+a.top+")"),b&&z.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)"),m&&(i.width(C/2),q.select(".nv-legendWrap").datum(e).call(i),a.top!=i.height()&&(a.top=i.height(),j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom),q.select(".nv-legendWrap").attr("transform","translate("+C/2+","+ -a.top+")")),w&&(s.width(180).color(["#444"]),z.select(".nv-controlsWrap").datum(H).attr("transform","translate(0,"+ -a.top+")").call(s)),t.width(C).height(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),q.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t),q.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+t.id()+")");var W=q.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(e){return e});W.enter().append("g").attr("class","nv-regLines");var X=W.selectAll(".nv-regLine").data(function(e){return[e]}),V=X.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0);X.transition().attr("x1",h.range()[0]).attr("x2",h.range()[1]).attr("y1",function(e,t){return p(h.domain()[0]*e.slope+e.intercept)}).attr("y2",function(e,t){return p(h.domain()[1]*e.slope+e.intercept)}).style("stroke",function(e,t,n){return c(e,n)}).style("stroke-opacity",function(e,t){return e.disabled||typeof e.slope=="undefined"||typeof e.intercept=="undefined"?0:1}),g&&(n.scale(h).ticks(n.ticks()?n.ticks():C/100).tickSize(-j,0),z.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)),y&&(r.scale(p).ticks(r.ticks()?r.ticks():j/36).tickSize(-C,0),z.select(".nv-y.nv-axis").call(r)),d&&(o.getData(t.x()).scale(h).width(C).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),U.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),z.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)),v&&(u.getData(t.y()).scale(p).width( -j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),U.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),z.select(".nv-distributionY").attr("transform","translate("+(b?C:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)),d3.fisheye&&(z.select(".nv-background").attr("width",C).attr("height",j),z.select(".nv-background").on("mousemove",$),z.select(".nv-background").on("click",function(){S=!S}),t.dispatch.on("elementClick.freezeFisheye",function(){S=!S})),s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled,E=e.disabled?0:2.5,z.select(".nv-background").style("pointer-events",e.disabled?"none":"all"),z.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none"),e.disabled?(h.distortion(E).focus(0),p.distortion(E).focus(0),z.select(".nv-scatterWrap").call(t),z.select(".nv-x.nv-axis").call(n),z.select(".nv-y.nv-axis").call(r)):S=!1,B.update()}),i.dispatch.on("stateChange",function(e){k=e,A.stateChange(k),B.update()}),t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.pos[1]-j),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size()),e.pos=[e.pos[0]+a.left,e.pos[1]+a.top],A.tooltipShow(e)}),A.on("tooltipShow",function(e){x&&P(e,N.parentNode)}),A.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),k.disabled=t.disabled),B.update()}),_=h.copy(),D=p.copy()}),B}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution(),a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=!1,v=!1,m=!0,g=!0,y=!0,b=!1,w=!!d3.fisheye,E=0,S=!1,x=!0,T=function(e,t,n){return""+t+""},N=function(e,t,n){return""+n+""},C=function(e,t,n,r){return"

"+e+"

"+"

"+r+"

"},k={},L=null,A=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),O="No Data Available.",M=250;t.xScale(h).yScale(p),n.orient("bottom").tickPadding(10),r.orient(b?"right":"left").tickPadding(10),o.axis("x"),u.axis("y"),s.updateState(!1);var _,D,P=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));T!=null&&e.tooltip.show([f,l],T(i.series.key,v,m,i,B),"n",1,s,"x-nvtooltip"),N!=null&&e.tooltip.show([c,d],N(i.series.key,v,m,i,B),"e",1,s,"y-nvtooltip"),C!=null&&e.tooltip.show([o,u],C(i.series.key,v,m,i.point.tooltip,i,B),i.value<0?"n":"s",null,s)},H=[{key:"Magnify",disabled:!0}];return t.dispatch.on("elementMouseout.tooltip",function(e){A.tooltipHide(e),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())}),A.on("tooltipHide",function(){x&&e.tooltip.cleanup()}),B.dispatch=A,B.scatter=t,B.legend=i,B.controls=s,B.xAxis=n,B.yAxis=r,B.distX=o,B.distY=u,d3.rebind(B,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),B.options=e.utils.optionsFunc.bind(B),B.margin=function(e){return arguments.length?(a.top=typeof e.top!="undefined"?e.top:a.top,a.right=typeof e.right!="undefined"?e.right:a.right,a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom,a.left=typeof e.left!="undefined"?e.left:a.left,B):a},B.width=function(e){return arguments.length?(f=e,B):f},B.height=function(e){return arguments.length?(l=e,B):l},B.color=function(t){return arguments.length?(c=e.utils.getColor(t),i.color(c),o.color(c),u.color(c),B):c},B.showDistX=function(e){return arguments.length?(d=e,B):d},B.showDistY=function(e){return arguments.length?(v=e,B):v},B.showControls=function(e){return arguments.length?(w=e,B):w},B.showLegend=function(e){return arguments.length?(m=e,B):m},B.showXAxis=function(e){return arguments.length?(g=e,B):g},B.showYAxis=function(e){return arguments.length?(y=e,B):y},B.rightAlignYAxis=function(e){return arguments.length?(b=e,r.orient(e?"right":"left"),B):b},B.fisheye=function(e){return arguments.length?(E=e,B):E},B.tooltips=function(e){return arguments.length?(x=e,B):x},B.tooltipContent=function(e){return arguments.length?(C=e,B):C},B.tooltipXContent=function(e){return arguments.length?(T=e,B):T},B.tooltipYContent=function(e){return arguments.length?(N=e,B):N},B.state=function(e){return arguments.length?(k=e,B):k},B.defaultState=function(e){return arguments.length?(L=e,B):L},B.noData=function(e){return arguments.length?(O=e,B):O},B.transitionDuration=function(e){return arguments.length?(M=e,B):M},B},e.models.sparkline=function(){"use strict";function d(e){return e.each(function(e){var i=n-t.left-t.right,d=r-t.top-t.bottom,v=d3.select(this);s.domain(l||d3.extent(e,u)).range(h||[0,i]),o.domain(c||d3.extent(e,a)).range(p||[d,0]);var m=v.selectAll("g.nv-wrap.nv-sparkline").data([e]),g=m.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline"),b=g.append("g"),w=m.select("g");m.attr("transform","translate("+t.left+","+t.top+")");var E=m.selectAll("path").data(function(e){return[e]});E.enter().append("path"),E.exit().remove(),E.style("stroke",function(e,t){return e.color||f(e,t)}).attr("d",d3.svg.line().x(function(e,t){return s(u(e,t))}).y(function(e,t){return o(a(e,t))}));var S=m.selectAll("circle.nv-point").data(function(e){function n(t){if(t!=-1){var n=e[t];return n.pointIndex=t,n}return null}var t=e.map(function(e,t){return a(e,t)}),r=n(t.lastIndexOf(o.domain()[1])),i=n(t.indexOf(o.domain()[0])),s=n(t.length-1);return[i,r,s].filter(function(e){return e!=null})});S.enter().append("circle"),S.exit().remove(),S.attr("cx",function(e,t){return s(u(e,e.pointIndex))}).attr("cy",function(e,t){return o(a(e,e.pointIndex))}).attr("r",2).attr("class",function(e,t){return u(e,e.pointIndex)==s.domain()[1]?"nv-point nv-currentValue":a(e,e.pointIndex)==o.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),d}var t={top:2,right:0,bottom:2,left:0},n=400,r=32,i=!0,s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=e.utils.getColor(["#000"]),l,c,h,p;return d.options=e.utils.optionsFunc.bind(d),d.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,d):t},d.width=function(e){return arguments.length?(n=e,d):n},d.height=function(e){return arguments.length?(r=e,d):r},d.x=function(e){return arguments.length?(u=d3.functor(e),d):u},d.y=function(e){return arguments.length?(a=d3.functor(e),d):a},d.xScale=function(e){return arguments.length?(s=e,d):s},d.yScale=function(e){return arguments.length?(o=e,d):o},d.xDomain=function(e){return arguments.length?(l=e,d):l},d.yDomain=function(e){return arguments.length?(c=e,d):c},d.xRange=function(e){return arguments.length?(h=e,d):h},d.yRange=function(e){return arguments.length?(p=e,d):p},d.animate=function(e){return arguments.length?(i=e,d):i},d.color=function(t){return arguments.length?(f=e.utils.getColor(t),d):f},d},e.models.sparklinePlus=function(){"use strict";function v(e){return e.each(function(c){function O(){if(a)return;var e=C.selectAll(".nv-hoverValue").data(u),r=e.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);e.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),e.attr("transform",function(e){return"translate("+s(t.x()(c[e],e))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1);if(!u.length)return;r.append("line").attr("x1",0).attr("y1",-n.top).attr("x2",0).attr("y2",b),r.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-n.top).attr("text-anchor","end").attr("dy",".9em"),C.select(".nv-hoverValue .nv-xValue").text(f(t.x()(c[u[0]],u[0]))),r.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-n.top).attr("text-anchor","start").attr("dy",".9em"),C.select(".nv-hoverValue .nv-yValue").text(l(t.y()(c[u[0]],u[0])))}function M(){function r(e,n){var r=Math.abs(t.x()(e[0],0)-n),i=0;for(var s=0;s2){var h=M.yScale().invert(i.mouseY),p=Infinity,d=null;c.forEach(function(e,t){h=Math.abs(h);var n=Math.abs(e.stackedValue.y0),r=Math.abs(e.stackedValue.y);if(h>=n&&h<=r+n){d=t;return}}),d!=null&&(c[d].highlight=!0)}var v=n.tickFormat()(M.x()(s,a)),m=t.style()=="expand"?function(e,t){return d3.format(".1%")(e)}:function(e,t){return r.tickFormat()(e)};o.tooltip.position({left:f+u.left,top:i.mouseY+u.top}).chartContainer(D.parentNode).enabled(g).valueFormatter(m).data({value:v,series:c})(),o.renderGuideLine(f)}),o.dispatch.on("elementMouseout",function(e){N.tooltipHide(),t.clearHighlights()}),N.on("tooltipShow",function(e){g&&O(e,D.parentNode)}),N.on("changeState",function(e){typeof e.disabled!="undefined"&&y.length===e.disabled.length&&(y.forEach(function(t,n){t.disabled=e.disabled[n]}),S.disabled=e.disabled),typeof e.style!="undefined"&&t.style(e.style),M.update()})}),M}var t=e.models.stackedArea(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline(),u={top:30,right:25,bottom:50,left:60},a=null,f=null,l=e.utils.defaultColor(),c=!0,h=!0,p=!0,d=!0,v=!1,m=!1,g=!0,y=function(e,t,n,r,i){return"

"+e+"

"+"

"+n+" on "+t+"

"},b,w,E=d3.format(",.2f"),S={style:t.style()},x=null,T="No Data Available.",N=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),C=250,k=["Stacked","Stream","Expanded"],L={},A=250;n.orient("bottom").tickPadding(7),r.orient(v?"right":"left"),s.updateState(!1);var O=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=y(i.series.key,a,f,i,M);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};return t.dispatch.on("tooltipShow",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],N.tooltipShow(e)}),t.dispatch.on("tooltipHide",function(e){N.tooltipHide(e)}),N.on("tooltipHide",function(){g&&e.tooltip.cleanup()}),M.dispatch=N,M.stacked=t,M.legend=i,M.controls=s,M.xAxis=n,M.yAxis=r,M.interactiveLayer=o,d3.rebind(M,t,"x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","sizeDomain","interactive","useVoronoi","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate"),M.options=e.utils.optionsFunc.bind(M),M.margin=function(e){return arguments.length?(u.top=typeof e.top!="undefined"?e.top:u.top,u.right=typeof e.right!="undefined"?e.right:u.right,u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom,u.left=typeof e.left!="undefined"?e.left:u.left,M):u},M.width=function(e){return arguments.length?(a=e,M):a},M.height=function(e){return arguments.length?(f=e,M):f},M.color=function(n){return arguments.length?(l=e.utils.getColor(n),i.color(l),t.color(l),M):l},M.showControls=function(e){return arguments.length?(c=e,M):c},M.showLegend=function(e){return arguments.length?(h=e,M):h},M.showXAxis=function(e){return arguments.length?(p=e,M):p},M.showYAxis=function(e){return arguments.length?(d=e,M):d},M.rightAlignYAxis=function(e){return arguments.length?(v=e,r.orient(e?"right":"left"),M):v},M.useInteractiveGuideline=function(e){return arguments.length?(m=e,e===!0&&(M.interactive(!1),M.useVoronoi(!1)),M):m},M.tooltip=function(e){return arguments.length?(y=e,M):y},M.tooltips=function(e){return arguments.length?(g=e,M):g},M.tooltipContent=function(e){return arguments.length?(y=e,M):y},M.state=function(e){return arguments.length?(S=e,M):S},M.defaultState=function(e){return arguments.length?(x=e,M):x},M.noData=function(e){return arguments.length?(T=e,M):T},M.transitionDuration=function(e){return arguments.length?(A=e,M):A},M.controlsData=function(e){return arguments.length?(k=e,M):k},M.controlLabels=function(e){return arguments.length?typeof e!="object"?L:(L=e,M):L},r.setTickFormat=r.tickFormat,r.tickFormat=function(e){return arguments.length?(E=e,r):E},M}})(); \ No newline at end of file +/* nvd3 version 1.8.6 (https://github.com/novus/nvd3) 2017-08-23 */ + +!function(){var a={};a.dev=!1,a.tooltip=a.tooltip||{},a.utils=a.utils||{},a.models=a.models||{},a.charts={},a.logs={},a.dom={},"undefined"!=typeof module&&"undefined"!=typeof exports&&"undefined"==typeof d3&&(d3=require("d3")),a.dispatch=d3.dispatch("render_start","render_end"),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.dev&&(a.dispatch.on("render_start",function(b){a.logs.startTime=+new Date}),a.dispatch.on("render_end",function(b){a.logs.endTime=+new Date,a.logs.totalTime=a.logs.endTime-a.logs.startTime,a.log("total",a.logs.totalTime)})),a.log=function(){if(a.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(a.dev&&window.console&&"function"==typeof console.log&&Function.prototype.bind){var b=Function.prototype.bind.call(console.log,console);b.apply(console,arguments)}return arguments[arguments.length-1]},a.deprecated=function(a,b){console&&console.warn&&console.warn("nvd3 warning: `"+a+"` has been deprecated. ",b||"")},a.render=function(b){b=b||1,a.render.active=!0,a.dispatch.render_start();var c=function(){for(var d,e,f=0;b>f&&(e=a.render.queue[f]);f++)d=e.generate(),typeof e.callback==typeof Function&&e.callback(d);a.render.queue.splice(0,f),a.render.queue.length?setTimeout(c):(a.dispatch.render_end(),a.render.active=!1)};setTimeout(c)},a.render.active=!1,a.render.queue=[],a.addGraph=function(b){typeof arguments[0]==typeof Function&&(b={generate:arguments[0],callback:arguments[1]}),a.render.queue.push(b),a.render.active||a.render()},"undefined"!=typeof module&&"undefined"!=typeof exports&&(module.exports=a),"undefined"!=typeof window&&(window.nv=a),a.dom.write=function(a){return void 0!==window.fastdom?fastdom.mutate(a):a()},a.dom.read=function(a){return void 0!==window.fastdom?fastdom.measure(a):a()},a.interactiveGuideline=function(){"use strict";function b(l){l.each(function(l){function m(){var a=d3.event.clientX-this.getBoundingClientRect().left,d=d3.event.clientY-this.getBoundingClientRect().top,e=!0,h=!1;if(k&&(a=d3.event.offsetX,d=d3.event.offsetY,"svg"!==d3.event.target.tagName&&(e=!1),d3.event.target.className.baseVal.match("nv-legend")&&(h=!0)),e&&(a-=c.left,d-=c.top),"mouseout"===d3.event.type||0>a||0>d||a>o||d>p||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||h){if(k&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(j.nvPointerEventsClass)))return;return g.elementMouseout({mouseX:a,mouseY:d}),b.renderGuideLine(null),void j.hidden(!0)}j.hidden(!1);var i="function"==typeof f.rangeBands,l=void 0;if(i){var m=d3.bisect(f.range(),a)-1;if(!(f.range()[m]+f.rangeBand()>=a))return g.elementMouseout({mouseX:a,mouseY:d}),b.renderGuideLine(null),void j.hidden(!0);l=f.domain()[d3.bisect(f.range(),a)-1]}else l=f.invert(a);g.elementMousemove({mouseX:a,mouseY:d,pointXValue:l}),"dblclick"===d3.event.type&&g.elementDblclick({mouseX:a,mouseY:d,pointXValue:l}),"click"===d3.event.type&&g.elementClick({mouseX:a,mouseY:d,pointXValue:l}),"mousedown"===d3.event.type&&g.elementMouseDown({mouseX:a,mouseY:d,pointXValue:l}),"mouseup"===d3.event.type&&g.elementMouseUp({mouseX:a,mouseY:d,pointXValue:l})}var n=d3.select(this),o=d||960,p=e||400,q=n.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([l]),r=q.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");r.append("g").attr("class","nv-interactiveGuideLine"),i&&(i.on("touchmove",m).on("mousemove",m,!0).on("mouseout",m,!0).on("mousedown",m,!0).on("mouseup",m,!0).on("dblclick",m).on("click",m),b.guideLine=null,b.renderGuideLine=function(c){h&&(b.guideLine&&b.guideLine.attr("x1")===c||a.dom.write(function(){var b=q.select(".nv-interactiveGuideLine").selectAll("line").data(null!=c?[a.utils.NaNtoZero(c)]:[],String);b.enter().append("line").attr("class","nv-guideline").attr("x1",function(a){return a}).attr("x2",function(a){return a}).attr("y1",p).attr("y2",0),b.exit().remove()}))})})}var c={left:0,top:0},d=null,e=null,f=d3.scale.linear(),g=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick","elementMouseDown","elementMouseUp"),h=!0,i=null,j=a.models.tooltip(),k=window.ActiveXObject;return j.duration(0).hideDelay(0).hidden(!1),b.dispatch=g,b.tooltip=j,b.margin=function(a){return arguments.length?(c.top="undefined"!=typeof a.top?a.top:c.top,c.left="undefined"!=typeof a.left?a.left:c.left,b):c},b.width=function(a){return arguments.length?(d=a,b):d},b.height=function(a){return arguments.length?(e=a,b):e},b.xScale=function(a){return arguments.length?(f=a,b):f},b.showGuideLine=function(a){return arguments.length?(h=a,b):h},b.svgContainer=function(a){return arguments.length?(i=a,b):i},b},a.interactiveBisect=function(a,b,c){"use strict";if(!(a instanceof Array))return null;var d;d="function"!=typeof c?function(a){return a.x}:c;var e=function(a,b){return d(a)-b},f=d3.bisector(e).left,g=d3.max([0,f(a,b)-1]),h=d(a[g]);if("undefined"==typeof h&&(h=g),h===b)return g;var i=d3.min([g+1,a.length-1]),j=d(a[i]);return"undefined"==typeof j&&(j=i),Math.abs(j-b)>=Math.abs(h-b)?g:i},a.nearestValueIndex=function(a,b,c){"use strict";var d=1/0,e=null;return a.forEach(function(a,f){var g=Math.abs(b-a);null!=a&&d>=g&&c>g&&(d=g,e=f)}),e},a.models.tooltip=function(){"use strict";function b(){if(!l||!l.node()){var a=[1];l=d3.select(document.body).select("#"+d).data(a),l.enter().append("div").attr("class","nvtooltip "+(i?i:"xy-tooltip")).attr("id",d).style("top",0).style("left",0).style("opacity",0).style("position","fixed").selectAll("div, table, td, tr").classed(q,!0).classed(q,!0),l.exit().remove()}}function c(){return n&&w(e)?(a.dom.write(function(){b();var a=u(e,l.node());a&&(l.node().innerHTML=a),y()}),c):void 0}var d="nvtooltip-"+Math.floor(1e5*Math.random()),e=null,f="w",g=25,h=0,i=null,j=!0,k=200,l=null,m={left:null,top:null},n=!0,o=100,p=!0,q="nv-pointer-events-none",r=function(a,b,c){return a},s=function(a){return a},t=function(a,b){return a},u=function(a,b){if(null===a)return"";var c=d3.select(document.createElement("table"));if(p){var d=c.selectAll("thead").data([a]).enter().append("thead");d.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(s(a.value))}var e=c.selectAll("tbody").data([a]).enter().append("tbody"),f=e.selectAll("tr").data(function(a){return a.series}).enter().append("tr").classed("highlight",function(a){return a.highlight});f.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(a){return a.color}),f.append("td").classed("key",!0).classed("total",function(a){return!!a.total}).html(function(a,b){return t(a.key,b)}),f.append("td").classed("value",!0).html(function(a,b){return r(a.value,b,a)}),f.filter(function(a,b){return void 0!==a.percent}).append("td").classed("percent",!0).html(function(a,b){return"("+d3.format("%")(a.percent)+")"}),f.selectAll("td").each(function(a){if(a.highlight){var b=d3.scale.linear().domain([0,1]).range(["#fff",a.color]),c=.6;d3.select(this).style("border-bottom-color",b(c)).style("border-top-color",b(c))}});var g=c.node().outerHTML;return void 0!==a.footer&&(g+=""),g},v=function(){var a={left:null!==d3.event?d3.event.clientX:0,top:null!==d3.event?d3.event.clientY:0};if("none"!=getComputedStyle(document.body).transform){var b=document.body.getBoundingClientRect();a.left-=b.left,a.top-=b.top}return a},w=function(b){if(b&&b.series){if(a.utils.isArray(b.series))return!0;if(a.utils.isObject(b.series))return b.series=[b.series],!0}return!1},x=function(a){var b,c,d,e=l.node().offsetHeight,h=l.node().offsetWidth,i=document.documentElement.clientWidth,j=document.documentElement.clientHeight;switch(f){case"e":b=-h-g,c=-(e/2),a.left+b<0&&(b=g),(d=a.top+c)<0&&(c-=d),(d=a.top+c+e)>j&&(c-=d-j);break;case"w":b=g,c=-(e/2),a.left+b+h>i&&(b=-h-g),(d=a.top+c)<0&&(c-=d),(d=a.top+c+e)>j&&(c-=d-j);break;case"n":b=-(h/2)-5,c=g,a.top+c+e>j&&(c=-e-g),(d=a.left+b)<0&&(b-=d),(d=a.left+b+h)>i&&(b-=d-i);break;case"s":b=-(h/2),c=-e-g,a.top+c<0&&(c=g),(d=a.left+b)<0&&(b-=d),(d=a.left+b+h)>i&&(b-=d-i);break;case"center":b=-(h/2),c=-(e/2);break;default:b=0,c=0}return{left:b,top:c}},y=function(){a.dom.read(function(){var a=v(),b=x(a),c=a.left+b.left,d=a.top+b.top;if(j)l.interrupt().transition().delay(k).duration(0).style("opacity",0);else{var e="translate("+m.left+"px, "+m.top+"px)",f="translate("+Math.round(c)+"px, "+Math.round(d)+"px)",g=d3.interpolateString(e,f),h=l.style("opacity")<.1;l.interrupt().transition().duration(h?0:o).styleTween("transform",function(a){return g},"important").styleTween("-webkit-transform",function(a){return g}).style("-ms-transform",f).style("opacity",1)}m.left=c,m.top=d})};return c.nvPointerEventsClass=q,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{duration:{get:function(){return o},set:function(a){o=a}},gravity:{get:function(){return f},set:function(a){f=a}},distance:{get:function(){return g},set:function(a){g=a}},snapDistance:{get:function(){return h},set:function(a){h=a}},classes:{get:function(){return i},set:function(a){i=a}},enabled:{get:function(){return n},set:function(a){n=a}},hideDelay:{get:function(){return k},set:function(a){k=a}},contentGenerator:{get:function(){return u},set:function(a){u=a}},valueFormatter:{get:function(){return r},set:function(a){r=a}},headerFormatter:{get:function(){return s},set:function(a){s=a}},keyFormatter:{get:function(){return t},set:function(a){t=a}},headerEnabled:{get:function(){return p},set:function(a){p=a}},position:{get:function(){return v},set:function(a){v=a}},chartContainer:{get:function(){return document.body},set:function(b){a.deprecated("chartContainer","feature removed after 1.8.3")}},fixedTop:{get:function(){return null},set:function(b){a.deprecated("fixedTop","feature removed after 1.8.1")}},offset:{get:function(){return{left:0,top:0}},set:function(b){a.deprecated("offset","use chart.tooltip.distance() instead")}},hidden:{get:function(){return j},set:function(a){j!=a&&(j=!!a,c())}},data:{get:function(){return e},set:function(a){a.point&&(a.value=a.point.x,a.series=a.series||{},a.series.value=a.point.y,a.series.color=a.point.color||a.series.color),e=a}},node:{get:function(){return l.node()},set:function(a){}},id:{get:function(){return d},set:function(a){}}}),a.utils.initOptions(c),c},a.utils.windowSize=function(){var a={width:640,height:480};return window.innerWidth&&window.innerHeight?(a.width=window.innerWidth,a.height=window.innerHeight,a):"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight,a):document.body&&document.body.offsetWidth?(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight,a):a},a.utils.isArray=Array.isArray,a.utils.isObject=function(a){return null!==a&&"object"==typeof a},a.utils.isFunction=function(a){return"function"==typeof a},a.utils.isDate=function(a){return"[object Date]"===toString.call(a)},a.utils.isNumber=function(a){return!isNaN(a)&&"number"==typeof a},a.utils.windowResize=function(b){return window.addEventListener?window.addEventListener("resize",b):a.log("ERROR: Failed to bind to window.resize with: ",b),{callback:b,clear:function(){window.removeEventListener("resize",b)}}},a.utils.getColor=function(b){if(void 0===b)return a.utils.defaultColor();if(a.utils.isArray(b)){var c=d3.scale.ordinal().range(b);return function(a,b){var d=void 0===b?a:b;return a.color||c(d)}}return b},a.utils.defaultColor=function(){return a.utils.getColor(d3.scale.category20().range())},a.utils.customTheme=function(b,c,d){c=c||function(a){return a.key},d=d||d3.scale.category20().range();var e=d.length;return function(f,g){var h=c(f);return a.utils.isFunction(b[h])?b[h]():void 0!==b[h]?b[h]:(e||(e=d.length),e-=1,d[e])}},a.utils.pjax=function(b,c){var d=function(d){d3.html(d,function(d){var e=d3.select(c).node();e.parentNode.replaceChild(d3.select(d).select(c).node(),e),a.utils.pjax(b,c)})};d3.selectAll(b).on("click",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&d(d3.event.state)})},a.utils.calcApproxTextWidth=function(b){if(a.utils.isFunction(b.style)&&a.utils.isFunction(b.text)){var c=parseInt(b.style("font-size").replace("px",""),10),d=b.text().length;return a.utils.NaNtoZero(d*c*.5)}return 0},a.utils.NaNtoZero=function(b){return!a.utils.isNumber(b)||isNaN(b)||null===b||b===1/0||b===-(1/0)?0:b},d3.selection.prototype.watchTransition=function(a){var b=[this].concat([].slice.call(arguments,1));return a.transition.apply(a,b)},a.utils.renderWatch=function(b,c){if(!(this instanceof a.utils.renderWatch))return new a.utils.renderWatch(b,c);var d=void 0!==c?c:250,e=[],f=this;this.models=function(a){return a=[].slice.call(arguments,0),a.forEach(function(a){a.__rendered=!1,function(a){a.dispatch.on("renderEnd",function(b){a.__rendered=!0,f.renderEnd("model")})}(a),e.indexOf(a)<0&&e.push(a)}),this},this.reset=function(a){void 0!==a&&(d=a),e=[]},this.transition=function(a,b,c){if(b=arguments.length>1?[].slice.call(arguments,1):[],c=b.length>1?b.pop():void 0!==d?d:250,a.__rendered=!1,e.indexOf(a)<0&&e.push(a),0===c)return a.__rendered=!0,a.delay=function(){return this},a.duration=function(){return this},a;0===a.length?a.__rendered=!0:a.every(function(a){return!a.length})?a.__rendered=!0:a.__rendered=!1;var g=0;return a.transition().duration(c).each(function(){++g}).each("end",function(c,d){0===--g&&(a.__rendered=!0,f.renderEnd.apply(this,b))})},this.renderEnd=function(){e.every(function(a){return a.__rendered})&&(e.forEach(function(a){a.__rendered=!1}),b.renderEnd.apply(this,arguments))}},a.utils.deepExtend=function(b){var c=arguments.length>1?[].slice.call(arguments,1):[];c.forEach(function(c){for(var d in c){var e=a.utils.isArray(b[d]),f=a.utils.isObject(b[d]),g=a.utils.isObject(c[d]);f&&!e&&g?a.utils.deepExtend(b[d],c[d]):b[d]=c[d]}})},a.utils.state=function(){if(!(this instanceof a.utils.state))return new a.utils.state;var b={},c=function(){},d=function(){return{}},e=null,f=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",function(a){c(a,!0)}),this.getter=function(a){return d=a,this},this.setter=function(a,b){return b||(b=function(){}),c=function(c,d){a(c),d&&b()},this},this.init=function(b){e=e||{},a.utils.deepExtend(e,b)};var g=function(){var a=d();if(JSON.stringify(a)===JSON.stringify(b))return!1;for(var c in a)void 0===b[c]&&(b[c]={}),b[c]=a[c],f=!0;return!0};this.update=function(){e&&(c(e,!1),e=null),g.call(this)&&this.dispatch.change(b)}},a.utils.optionsFunc=function(b){return b&&d3.map(b).forEach(function(b,c){a.utils.isFunction(this[b])&&this[b](c)}.bind(this)),this},a.utils.calcTicksX=function(b,c){var d=1,e=0;for(e;ed?f:d}return a.log("Requested number of ticks: ",b),a.log("Calculated max values to be: ",d),b=b>d?b=d-1:b,b=1>b?1:b,b=Math.floor(b),a.log("Calculating tick count as: ",b),b},a.utils.calcTicksY=function(b,c){return a.utils.calcTicksX(b,c)},a.utils.initOption=function(a,b){a._calls&&a._calls[b]?a[b]=a._calls[b]:(a[b]=function(c){return arguments.length?(a._overrides[b]=!0,a._options[b]=c,a):a._options[b]},a["_"+b]=function(c){return arguments.length?(a._overrides[b]||(a._options[b]=c),a):a._options[b]})},a.utils.initOptions=function(b){b._overrides=b._overrides||{};var c=Object.getOwnPropertyNames(b._options||{}),d=Object.getOwnPropertyNames(b._calls||{});c=c.concat(d);for(var e in c)a.utils.initOption(b,c[e])},a.utils.inheritOptionsD3=function(a,b,c){a._d3options=c.concat(a._d3options||[]),a._d3options=(a._d3options||[]).filter(function(a,b,c){return c.indexOf(a)===b}),c.unshift(b),c.unshift(a),d3.rebind.apply(this,c)},a.utils.arrayUnique=function(a){return a.sort().filter(function(b,c){return!c||b!=a[c-1]})},a.utils.symbolMap=d3.map(),a.utils.symbol=function(){function b(b,e){var f=c.call(this,b,e),g=d.call(this,b,e);return-1!==d3.svg.symbolTypes.indexOf(f)?d3.svg.symbol().type(f).size(g)():a.utils.symbolMap.get(f)(g)}var c,d=64;return b.type=function(a){return arguments.length?(c=d3.functor(a),b):c},b.size=function(a){return arguments.length?(d=d3.functor(a),b):d},b},a.utils.inheritOptions=function(b,c){var d=Object.getOwnPropertyNames(c._options||{}),e=Object.getOwnPropertyNames(c._calls||{}),f=c._inherited||[],g=c._d3options||[],h=d.concat(e).concat(f).concat(g);h.unshift(c),h.unshift(b),d3.rebind.apply(this,h),b._inherited=a.utils.arrayUnique(d.concat(e).concat(f).concat(d).concat(b._inherited||[])),b._d3options=a.utils.arrayUnique(g.concat(b._d3options||[]))},a.utils.initSVG=function(a){a.classed({"nvd3-svg":!0})},a.utils.sanitizeHeight=function(a,b){return a||parseInt(b.style("height"),10)||400},a.utils.sanitizeWidth=function(a,b){return a||parseInt(b.style("width"),10)||960},a.utils.availableHeight=function(b,c,d){return Math.max(0,a.utils.sanitizeHeight(b,c)-d.top-d.bottom)},a.utils.availableWidth=function(b,c,d){return Math.max(0,a.utils.sanitizeWidth(b,c)-d.left-d.right)},a.utils.noData=function(b,c){var d=b.options(),e=d.margin(),f=d.noData(),g=null==f?["No Data Available."]:[f],h=a.utils.availableHeight(null,c,e),i=a.utils.availableWidth(null,c,e),j=e.left+i/2,k=e.top+h/2;c.selectAll("g").remove();var l=c.selectAll(".nv-noData").data(g);l.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),l.attr("x",j).attr("y",k).text(function(a){return a})},a.utils.wrapTicks=function(a,b){a.each(function(){for(var a,c=d3.select(this),d=c.text().split(/\s+/).reverse(),e=[],f=0,g=1.1,h=c.attr("y"),i=parseFloat(c.attr("dy")),j=c.text(null).append("tspan").attr("x",0).attr("y",h).attr("dy",i+"em");a=d.pop();)e.push(a),j.text(e.join(" ")),j.node().getComputedTextLength()>b&&(e.pop(),j.text(e.join(" ")),e=[a],j=c.append("tspan").attr("x",0).attr("y",h).attr("dy",++f*g+i+"em").text(a))})},a.utils.arrayEquals=function(b,c){if(b===c)return!0;if(!b||!c)return!1;if(b.length!=c.length)return!1;for(var d=0,e=b.length;e>d;d++)if(b[d]instanceof Array&&c[d]instanceof Array){if(!a.arrayEquals(b[d],c[d]))return!1}else if(b[d]!=c[d])return!1;return!0},a.utils.pointIsInArc=function(a,b,c){var d=c.innerRadius()(b),e=c.outerRadius()(b),f=c.startAngle()(b),g=c.endAngle()(b),h=a.x*a.x+a.y*a.y,i=Math.atan2(a.x,-a.y);return i=0>i?i+2*Math.PI:i,h>=d*d&&e*e>=h&&i>=f&&g>=i},a.models.axis=function(){"use strict";function b(h){return u.reset(),h.each(function(b){var h=d3.select(this);a.utils.initSVG(h);var r=h.selectAll("g.nv-wrap.nv-axis").data([b]),s=r.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),v=(s.append("g"),r.select("g"));null!==o?d.ticks(o):("top"==d.orient()||"bottom"==d.orient())&&d.ticks(Math.abs(e.range()[1]-e.range()[0])/100),v.watchTransition(u,"axis").call(d),t=t||d.scale();var w=d.tickFormat();null==w&&(w=t.tickFormat());var x=v.selectAll("text.nv-axislabel").data([i||null]);x.exit().remove(),void 0!==q&&v.selectAll("g").select("text").style("font-size",q);var y,z,A;switch(d.orient()){case"top":x.enter().append("text").attr("class","nv-axislabel"),A=0,1===e.range().length?A=n?2*e.range()[0]+e.rangeBand():0:2===e.range().length?A=n?e.range()[0]+e.range()[1]+e.rangeBand():e.range()[1]:e.range().length>2&&(A=e.range()[e.range().length-1]+(e.range()[1]-e.range()[0])),x.attr("text-anchor","middle").attr("y",0).attr("x",A/2),j&&(z=r.selectAll("g.nv-axisMaxMin").data(e.domain()),z.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),z.exit().remove(),z.attr("transform",function(b,c){return"translate("+a.utils.NaNtoZero(e(b))+",0)"}).select("text").attr("dy","-0.5em").attr("y",-d.tickPadding()).attr("text-anchor","middle").text(function(a,b){var d=c||w,e=d(a);return(""+e).match("NaN")?"":e}),z.watchTransition(u,"min-max top").attr("transform",function(b,c){return"translate("+a.utils.NaNtoZero(e.range()[c])+",0)"}));break;case"bottom":y=p+36;var B=30,C=0,D=v.selectAll("g").select("text"),E="";if(k%360){D.attr("transform",""),D.each(function(a,b){var c=this.getBoundingClientRect(),d=c.width;C=c.height,d>B&&(B=d)}),E="rotate("+k+" 0,"+(C/2+d.tickPadding())+")";var F=Math.abs(Math.sin(k*Math.PI/180));y=(F?F*B:B)+30,D.attr("transform",E).style("text-anchor",k%360>0?"start":"end")}else m?D.attr("transform",function(a,b){return"translate(0,"+(b%2==0?"0":"12")+")"}):D.attr("transform","translate(0,0)");x.enter().append("text").attr("class","nv-axislabel"),A=0,1===e.range().length?A=n?2*e.range()[0]+e.rangeBand():0:2===e.range().length?A=n?e.range()[0]+e.range()[1]+e.rangeBand():e.range()[1]:e.range().length>2&&(A=e.range()[e.range().length-1]+(e.range()[1]-e.range()[0])),x.attr("text-anchor","middle").attr("y",y).attr("x",A/2),j&&(z=r.selectAll("g.nv-axisMaxMin").data([e.domain()[0],e.domain()[e.domain().length-1]]),z.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),z.exit().remove(),z.attr("transform",function(b,c){return"translate("+a.utils.NaNtoZero(e(b)+(n?e.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",d.tickPadding()).attr("transform",E).style("text-anchor",k?k%360>0?"start":"end":"middle").text(function(a,b){var d=c||w,e=d(a);return(""+e).match("NaN")?"":e}),z.watchTransition(u,"min-max bottom").attr("transform",function(b,c){return"translate("+a.utils.NaNtoZero(e(b)+(n?e.rangeBand()/2:0))+",0)"}));break;case"right":x.enter().append("text").attr("class","nv-axislabel"),x.style("text-anchor",l?"middle":"begin").attr("transform",l?"rotate(90)":"").attr("y",l?-Math.max(f.right,g)+12-(p||0):-10).attr("x",l?d3.max(e.range())/2:d.tickPadding()),j&&(z=r.selectAll("g.nv-axisMaxMin").data(e.domain()),z.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),z.exit().remove(),z.attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(e(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",d.tickPadding()).style("text-anchor","start").text(function(a,b){var d=c||w,e=d(a);return(""+e).match("NaN")?"":e}),z.watchTransition(u,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(e.range()[c])+")"}).select("text").style("opacity",1));break;case"left":x.enter().append("text").attr("class","nv-axislabel"),x.style("text-anchor",l?"middle":"end").attr("transform",l?"rotate(-90)":"").attr("y",l?-Math.max(f.left,g)+25-(p||0):-10).attr("x",l?-d3.max(e.range())/2:-d.tickPadding()),j&&(z=r.selectAll("g.nv-axisMaxMin").data(e.domain()),z.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),z.exit().remove(),z.attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(t(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-d.tickPadding()).attr("text-anchor","end").text(function(a,b){var d=c||w,e=d(a);return(""+e).match("NaN")?"":e}),z.watchTransition(u,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(e.range()[c])+")"}).select("text").style("opacity",1))}if(x.text(function(a){return a}),!j||"left"!==d.orient()&&"right"!==d.orient()||(v.selectAll("g").each(function(a,b){d3.select(this).select("text").attr("opacity",1),(e(a)e.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),e.domain()[0]==e.domain()[1]&&0==e.domain()[0]&&r.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),j&&("top"===d.orient()||"bottom"===d.orient())){var G=[];r.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?G.push(e(a)-this.getBoundingClientRect().width-4):G.push(e(a)+this.getBoundingClientRect().width+4)}catch(c){b?G.push(e(a)-4):G.push(e(a)+4)}}),v.selectAll("g").each(function(a,b){(e(a)G[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}v.selectAll(".tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)&&void 0!==a}).classed("zero",!0),t=e.copy()}),u.renderEnd("axis immediate"),b}var c,d=d3.svg.axis(),e=d3.scale.linear(),f={top:0,right:0,bottom:0,left:0},g=75,h=60,i=null,j=!0,k=0,l=!0,m=!1,n=!1,o=null,p=0,q=void 0,r=250,s=d3.dispatch("renderEnd");d.scale(e).orient("bottom").tickFormat(function(a){return a});var t,u=a.utils.renderWatch(s,r);return b.axis=d,b.dispatch=s,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{axisLabelDistance:{get:function(){return p},set:function(a){p=a}},staggerLabels:{get:function(){return m},set:function(a){m=a}},rotateLabels:{get:function(){return k},set:function(a){k=a}},rotateYLabel:{get:function(){return l},set:function(a){l=a}},showMaxMin:{get:function(){return j},set:function(a){j=a}},axisLabel:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return h},set:function(a){h=a}},ticks:{get:function(){return o},set:function(a){o=a}},width:{get:function(){return g},set:function(a){g=a}},fontSize:{get:function(){return q},set:function(a){q=a}},tickFormatMaxMin:{get:function(){return c},set:function(a){c=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},duration:{get:function(){return r},set:function(a){r=a,u.reset(r)}},scale:{get:function(){return e},set:function(c){e=c,d.scale(e),n="function"==typeof e.rangeBands,a.utils.inheritOptionsD3(b,e,["domain","range","rangeBand","rangeBands"])}}}),a.utils.initOptions(b),a.utils.inheritOptionsD3(b,d,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),a.utils.inheritOptionsD3(b,e,["domain","range","rangeBand","rangeBands"]),b},a.models.boxPlot=function(){"use strict";function b(l){return E.reset(),l.each(function(b){var l=j-i.left-i.right,F=k-i.top-i.bottom;A=d3.select(this),a.utils.initSVG(A),m.domain(c||b.map(function(a,b){return o(a,b)})).rangeBands(d||[0,l],.1);var G=[];if(!e){var H,I,J=[];b.forEach(function(a,b){var c=p(a),d=r(a),e=s(a),f=t(a),g=v(a);g&&g.forEach(function(a,b){J.push(w(a,b,void 0))}),e&&J.push(e),c&&J.push(c),d&&J.push(d),f&&J.push(f)}),H=d3.min(J),I=d3.max(J),G=[H,I]}n.domain(e||G),n.range(f||[F,0]),g=g||m,h=h||n.copy().range([n(0),n(0)]);var K=A.selectAll("g.nv-wrap").data([b]);K.enter().append("g").attr("class","nvd3 nv-wrap");K.attr("transform","translate("+i.left+","+i.top+")");var L=K.selectAll(".nv-boxplot").data(function(a){return a}),M=L.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);L.attr("class","nv-boxplot").attr("transform",function(a,b,c){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}).classed("hover",function(a){return a.hover}),L.watchTransition(E,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay(function(a,c){return c*C/b.length}).attr("transform",function(a,b){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}),L.exit().remove(),M.each(function(a,b){var c=d3.select(this);[s,t].forEach(function(d){if(void 0!==d(a)&&null!==d(a)){var e=d===s?"low":"high";c.append("line").style("stroke",u(a)||z(a,b)).attr("class","nv-boxplot-whisker nv-boxplot-"+e),c.append("line").style("stroke",u(a)||z(a,b)).attr("class","nv-boxplot-tick nv-boxplot-"+e)}})});var N=function(){return null===D?.9*m.rangeBand():Math.min(75,.9*m.rangeBand())},O=function(){return.45*m.rangeBand()-N()/2},P=function(){return.45*m.rangeBand()+N()/2};[s,t].forEach(function(a){var b=a===s?"low":"high",c=a===s?p:r;L.select("line.nv-boxplot-whisker.nv-boxplot-"+b).watchTransition(E,"nv-boxplot: boxplots").attr("x1",.45*m.rangeBand()).attr("y1",function(b,c){return n(a(b))}).attr("x2",.45*m.rangeBand()).attr("y2",function(a,b){return n(c(a))}),L.select("line.nv-boxplot-tick.nv-boxplot-"+b).watchTransition(E,"nv-boxplot: boxplots").attr("x1",O).attr("y1",function(b,c){return n(a(b))}).attr("x2",P).attr("y2",function(b,c){return n(a(b))})}),[s,t].forEach(function(a){var b=a===s?"low":"high";M.selectAll(".nv-boxplot-"+b).on("mouseover",function(b,c,d){d3.select(this).classed("hover",!0),B.elementMouseover({series:{key:a(b),color:u(b)||z(b,d)},e:d3.event})}).on("mouseout",function(b,c,d){d3.select(this).classed("hover",!1),B.elementMouseout({series:{key:a(b),color:u(b)||z(b,d)},e:d3.event})}).on("mousemove",function(a,b){B.elementMousemove({e:d3.event})})}),M.append("rect").attr("class","nv-boxplot-box").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),B.elementMouseover({key:o(a),value:o(a),series:[{key:"Q3",value:r(a),color:u(a)||z(a,b)},{key:"Q2",value:q(a),color:u(a)||z(a,b)},{key:"Q1",value:p(a),color:u(a)||z(a,b)}],data:a,index:b,e:d3.event})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),B.elementMouseout({key:o(a),value:o(a),series:[{key:"Q3",value:r(a),color:u(a)||z(a,b)},{key:"Q2",value:q(a),color:u(a)||z(a,b)},{key:"Q1",value:p(a),color:u(a)||z(a,b)}],data:a,index:b,e:d3.event})}).on("mousemove",function(a,b){B.elementMousemove({e:d3.event})}),L.select("rect.nv-boxplot-box").watchTransition(E,"nv-boxplot: boxes").attr("y",function(a,b){return n(r(a))}).attr("width",N).attr("x",O).attr("height",function(a,b){return Math.abs(n(r(a))-n(p(a)))||1}).style("fill",function(a,b){return u(a)||z(a,b)}).style("stroke",function(a,b){return u(a)||z(a,b)}),M.append("line").attr("class","nv-boxplot-median"),L.select("line.nv-boxplot-median").watchTransition(E,"nv-boxplot: boxplots line").attr("x1",O).attr("y1",function(a,b){return n(q(a))}).attr("x2",P).attr("y2",function(a,b){return n(q(a))});var Q=L.selectAll(".nv-boxplot-outlier").data(function(a){return v(a)||[]});Q.enter().append("circle").style("fill",function(a,b,c){return y(a,b,c)||z(a,c)}).style("stroke",function(a,b,c){return y(a,b,c)||z(a,c)}).style("z-index",9e3).on("mouseover",function(a,b,c){d3.select(this).classed("hover",!0),B.elementMouseover({series:{key:x(a,b,c),color:y(a,b,c)||z(a,c)},e:d3.event})}).on("mouseout",function(a,b,c){d3.select(this).classed("hover",!1),B.elementMouseout({series:{key:x(a,b,c),color:y(a,b,c)||z(a,c)},e:d3.event})}).on("mousemove",function(a,b){B.elementMousemove({e:d3.event})}),Q.attr("class","nv-boxplot-outlier"),Q.watchTransition(E,"nv-boxplot: nv-boxplot-outlier").attr("cx",.45*m.rangeBand()).attr("cy",function(a,b,c){return n(w(a,b,c))}).attr("r","3"),Q.exit().remove(),g=m.copy(),h=n.copy()}),E.renderEnd("nv-boxplot immediate"),b}var c,d,e,f,g,h,i={top:0,right:0,bottom:0,left:0},j=960,k=500,l=Math.floor(1e4*Math.random()),m=d3.scale.ordinal(),n=d3.scale.linear(),o=function(a){return a.label},p=function(a){return a.values.Q1},q=function(a){return a.values.Q2},r=function(a){return a.values.Q3},s=function(a){return a.values.whisker_low},t=function(a){return a.values.whisker_high},u=function(a){return a.color},v=function(a){return a.values.outliers},w=function(a,b,c){return a},x=function(a,b,c){return a},y=function(a,b,c){return void 0},z=a.utils.defaultColor(),A=null,B=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),C=250,D=null,E=a.utils.renderWatch(B,C);return b.dispatch=B,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){ +k=a}},maxBoxWidth:{get:function(){return D},set:function(a){D=a}},x:{get:function(){return o},set:function(a){o=a}},q1:{get:function(){return p},set:function(a){p=a}},q2:{get:function(){return q},set:function(a){q=a}},q3:{get:function(){return r},set:function(a){r=a}},wl:{get:function(){return s},set:function(a){s=a}},wh:{get:function(){return t},set:function(a){t=a}},itemColor:{get:function(){return u},set:function(a){u=a}},outliers:{get:function(){return v},set:function(a){v=a}},outlierValue:{get:function(){return w},set:function(a){w=a}},outlierLabel:{get:function(){return x},set:function(a){x=a}},outlierColor:{get:function(){return y},set:function(a){y=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return d},set:function(a){d=a}},yRange:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return l},set:function(a){l=a}},y:{get:function(){return console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead."),{}},set:function(a){console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead.")}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},color:{get:function(){return z},set:function(b){z=a.utils.getColor(b)}},duration:{get:function(){return C},set:function(a){C=a,E.reset(C)}}}),a.utils.initOptions(b),b},a.models.boxPlotChart=function(){"use strict";function b(k){return t.reset(),t.models(e),l&&t.models(f),m&&t.models(g),k.each(function(k){var p=d3.select(this);a.utils.initSVG(p);var t=(i||parseInt(p.style("width"))||960)-h.left-h.right,u=(j||parseInt(p.style("height"))||400)-h.top-h.bottom;if(b.update=function(){r.beforeUpdate(),p.transition().duration(s).call(b)},b.container=this,!k||!k.length){var v=p.selectAll(".nv-noData").data([q]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",h.left+t/2).attr("y",h.top+u/2).text(function(a){return a}),b}p.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var w=p.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([k]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),y=x.append("defs"),z=w.select("g");x.append("g").attr("class","nv-x nv-axis"),x.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),x.append("g").attr("class","nv-barsWrap"),z.attr("transform","translate("+h.left+","+h.top+")"),n&&z.select(".nv-y.nv-axis").attr("transform","translate("+t+",0)"),e.width(t).height(u);var A=z.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));if(A.transition().call(e),y.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),z.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(o?2:1)).attr("height",16).attr("x",-c.rangeBand()/(o?1:2)),l){f.scale(c).ticks(a.utils.calcTicksX(t/100,k)).tickSize(-u,0),z.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),z.select(".nv-x.nv-axis").call(f);var B=z.select(".nv-x.nv-axis").selectAll("g");o&&B.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2===0?"5":"17")+")"})}m&&(g.scale(d).ticks(Math.floor(u/36)).tickSize(-t,0),z.select(".nv-y.nv-axis").call(g)),z.select(".nv-zeroLine line").attr("x1",0).attr("x2",t).attr("y1",d(0)).attr("y2",d(0))}),t.renderEnd("nv-boxplot chart immediate"),b}var c,d,e=a.models.boxPlot(),f=a.models.axis(),g=a.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=a.utils.getColor(),l=!0,m=!0,n=!1,o=!1,p=a.models.tooltip(),q="No Data Available.",r=d3.dispatch("beforeUpdate","renderEnd"),s=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(n?"right":"left").tickFormat(d3.format(",.1f")),p.duration(0);var t=a.utils.renderWatch(r,s);return e.dispatch.on("elementMouseover.tooltip",function(a){p.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){p.data(a).hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(a){p()}),b.dispatch=r,b.boxplot=e,b.xAxis=f,b.yAxis=g,b.tooltip=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},staggerLabels:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return l},set:function(a){l=a}},showYAxis:{get:function(){return m},set:function(a){m=a}},tooltipContent:{get:function(){return p},set:function(a){p=a}},noData:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!==a.top?a.top:h.top,h.right=void 0!==a.right?a.right:h.right,h.bottom=void 0!==a.bottom?a.bottom:h.bottom,h.left=void 0!==a.left?a.left:h.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}},rightAlignYAxis:{get:function(){return n},set:function(a){n=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.bullet=function(){"use strict";function b(a,b){var c=a.slice();a.sort(function(a,d){var e=c.indexOf(a),f=c.indexOf(d);return d3.descending(b[e],b[f])})}function c(e){return e.each(function(c,e){var s=p-d.left-d.right,y=q-d.top-d.bottom;r=d3.select(this),a.utils.initSVG(r);var z=g.call(this,c,e).slice(),A=h.call(this,c,e).slice(),B=i.call(this,c,e).slice(),C=j.call(this,c,e).slice(),D=k.call(this,c,e).slice(),E=l.call(this,c,e).slice(),F=m.call(this,c,e).slice(),G=n.call(this,c,e).slice();b(D,z),b(E,A),b(F,B),b(G,C),z.sort(d3.descending),A.sort(d3.descending),B.sort(d3.descending),C.sort(d3.descending);var H=d3.scale.linear().domain(d3.extent(d3.merge([o,z]))).range(f?[s,0]:[0,s]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(H.range());this.__chart__=H;for(var I=(d3.min(z),d3.max(z),z[1],r.selectAll("g.nv-wrap.nv-bullet").data([c])),J=I.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),K=J.append("g"),L=I.select("g"),e=0,M=z.length;M>e;e++){var N="nv-range nv-range"+e;2>=e&&(N=N+" nv-range"+w[e]),K.append("rect").attr("class",N)}K.append("rect").attr("class","nv-measure"),I.attr("transform","translate("+d.left+","+d.top+")");for(var O=function(a){return Math.abs(H(a)-H(0))},P=function(a){return H(0>a?a:0)},e=0,M=z.length;M>e;e++){var Q=z[e];L.select("rect.nv-range"+e).datum(Q).attr("height",y).transition().duration(x).attr("width",O(Q)).attr("x",P(Q))}L.select("rect.nv-measure").style("fill",t).attr("height",y/3).attr("y",y/3).on("mouseover",function(){u.elementMouseover({value:C[0],label:G[0]||"Current",color:d3.select(this).style("fill")})}).on("mousemove",function(){u.elementMousemove({value:C[0],label:G[0]||"Current",color:d3.select(this).style("fill")})}).on("mouseout",function(){u.elementMouseout({value:C[0],label:G[0]||"Current",color:d3.select(this).style("fill")})}).transition().duration(x).attr("width",0>C?H(0)-H(C[0]):H(C[0])-H(0)).attr("x",P(C));var R=y/6,S=A.map(function(a,b){return{value:a,label:E[b]}});K.selectAll("path.nv-markerTriangle").data(S).enter().append("path").attr("class","nv-markerTriangle").attr("d","M0,"+R+"L"+R+","+-R+" "+-R+","+-R+"Z").on("mouseover",function(a){u.elementMouseover({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill"),pos:[H(a.value),y/2]})}).on("mousemove",function(a){u.elementMousemove({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){u.elementMouseout({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}),L.selectAll("path.nv-markerTriangle").data(S).transition().duration(x).attr("transform",function(a){return"translate("+H(a.value)+","+y/2+")"});var T=B.map(function(a,b){return{value:a,label:F[b]}});K.selectAll("line.nv-markerLine").data(T).enter().append("line").attr("cursor","").attr("class","nv-markerLine").attr("x1",function(a){return H(a.value)}).attr("y1","2").attr("x2",function(a){return H(a.value)}).attr("y2",y-2).on("mouseover",function(a){u.elementMouseover({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill"),pos:[H(a.value),y/2]})}).on("mousemove",function(a){u.elementMousemove({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){u.elementMouseout({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}),L.selectAll("line.nv-markerLine").data(T).transition().duration(x).attr("x1",function(a){return H(a.value)}).attr("x2",function(a){return H(a.value)}),I.selectAll(".nv-range").on("mouseover",function(a,b){var c=D[b]||v[b];u.elementMouseover({value:a,label:c,color:d3.select(this).style("fill")})}).on("mousemove",function(){u.elementMousemove({value:C[0],label:G[0]||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){var c=D[b]||v[b];u.elementMouseout({value:a,label:c,color:d3.select(this).style("fill")})})}),c}var d={top:0,right:0,bottom:0,left:0},e="left",f=!1,g=function(a){return a.ranges},h=function(a){return a.markers?a.markers:[]},i=function(a){return a.markerLines?a.markerLines:[0]},j=function(a){return a.measures},k=function(a){return a.rangeLabels?a.rangeLabels:[]},l=function(a){return a.markerLabels?a.markerLabels:[]},m=function(a){return a.markerLineLabels?a.markerLineLabels:[]},n=function(a){return a.measureLabels?a.measureLabels:[]},o=[0],p=380,q=30,r=null,s=null,t=a.utils.getColor(["#1f77b4"]),u=d3.dispatch("elementMouseover","elementMouseout","elementMousemove"),v=["Maximum","Mean","Minimum"],w=["Max","Avg","Min"],x=1e3;return c.dispatch=u,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{ranges:{get:function(){return g},set:function(a){g=a}},markers:{get:function(){return h},set:function(a){h=a}},measures:{get:function(){return j},set:function(a){j=a}},forceX:{get:function(){return o},set:function(a){o=a}},width:{get:function(){return p},set:function(a){p=a}},height:{get:function(){return q},set:function(a){q=a}},tickFormat:{get:function(){return s},set:function(a){s=a}},duration:{get:function(){return x},set:function(a){x=a}},margin:{get:function(){return d},set:function(a){d.top=void 0!==a.top?a.top:d.top,d.right=void 0!==a.right?a.right:d.right,d.bottom=void 0!==a.bottom?a.bottom:d.bottom,d.left=void 0!==a.left?a.left:d.left}},orient:{get:function(){return e},set:function(a){e=a,f="right"==e||"bottom"==e}},color:{get:function(){return t},set:function(b){t=a.utils.getColor(b)}}}),a.utils.initOptions(c),c},a.models.bulletChart=function(){"use strict";function b(d){return d.each(function(e,o){var p=d3.select(this);a.utils.initSVG(p);var q=a.utils.availableWidth(k,p,g),r=l-g.top-g.bottom;if(b.update=function(){b(d)},b.container=this,!e||!h.call(this,e,o))return a.utils.noData(b,p),b;p.selectAll(".nv-noData").remove();var s=h.call(this,e,o).slice().sort(d3.descending),t=i.call(this,e,o).slice().sort(d3.descending),u=j.call(this,e,o).slice().sort(d3.descending),v=p.selectAll("g.nv-wrap.nv-bulletChart").data([e]),w=v.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),x=w.append("g"),y=v.select("g");x.append("g").attr("class","nv-bulletWrap"),x.append("g").attr("class","nv-titles"),v.attr("transform","translate("+g.left+","+g.top+")");var z=d3.scale.linear().domain([0,Math.max(s[0],t[0]||0,u[0])]).range(f?[q,0]:[0,q]),A=this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range());this.__chart__=z;var B=x.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(l-g.top-g.bottom)/2+")");B.append("text").attr("class","nv-title").text(function(a){return a.title}),B.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(a){return a.subtitle}),c.width(q).height(r);var C=y.select(".nv-bulletWrap");d3.transition(C).call(c);var D=m||z.tickFormat(q/100),E=y.selectAll("g.nv-tick").data(z.ticks(n?n:q/50),function(a){return this.textContent||D(a)}),F=E.enter().append("g").attr("class","nv-tick").attr("transform",function(a){return"translate("+A(a)+",0)"}).style("opacity",1e-6);F.append("line").attr("y1",r).attr("y2",7*r/6),F.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*r/6).text(D);var G=d3.transition(E).transition().duration(c.duration()).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1);G.select("line").attr("y1",r).attr("y2",7*r/6),G.select("text").attr("y",7*r/6),d3.transition(E.exit()).transition().duration(c.duration()).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1e-6).remove()}),d3.timer.flush(),b}var c=a.models.bullet(),d=a.models.tooltip(),e="left",f=!1,g={top:5,right:40,bottom:20,left:120},h=function(a){return a.ranges},i=function(a){return a.markers?a.markers:[]},j=function(a){return a.measures},k=null,l=55,m=null,n=null,o=null,p=d3.dispatch();return d.duration(0).headerEnabled(!1),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.label,value:a.value,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(a){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(a){d()}),b.bullet=c,b.dispatch=p,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return h},set:function(a){h=a}},markers:{get:function(){return i},set:function(a){i=a}},measures:{get:function(){return j},set:function(a){j=a}},width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},tickFormat:{get:function(){return m},set:function(a){m=a}},ticks:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},orient:{get:function(){return e},set:function(a){e=a,f="right"==e||"bottom"==e}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.candlestickBar=function(){"use strict";function b(x){return x.each(function(b){c=d3.select(this);var x=a.utils.availableWidth(i,c,h),y=a.utils.availableHeight(j,c,h);a.utils.initSVG(c);var A=x/b[0].values.length*.45;l.domain(d||d3.extent(b[0].values.map(n).concat(t))),v?l.range(f||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]):l.range(f||[5+A/2,x-A/2-5]),m.domain(e||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(g||[y,0]),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1]));var B=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([b[0].values]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-ticks"),B.attr("transform","translate("+h.left+","+h.top+")"),c.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:k})}),D.append("clipPath").attr("id","nv-chart-clip-path-"+k).append("rect"),B.select("#nv-chart-clip-path-"+k+" rect").attr("width",x).attr("height",y),F.attr("clip-path",w?"url(#nv-chart-clip-path-"+k+")":"");var G=B.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});G.exit().remove();var H=G.enter().append("g");G.attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b});H.append("line").attr("class","nv-candlestick-lines").attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),H.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)});G.select(".nv-candlestick-lines").transition().attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),G.select(".nv-candlestick-rects").transition().attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}),b}var c,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=null,j=null,k=Math.floor(1e4*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,d){b.clearHighlights(),c.select(".nv-candlestickBar .nv-tick-0-"+a).classed("hover",d)},b.clearHighlights=function(){c.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return k},set:function(a){k=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!=a.top?a.top:h.top,h.right=void 0!=a.right?a.right:h.right,h.bottom=void 0!=a.bottom?a.bottom:h.bottom,h.left=void 0!=a.left?a.left:h.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.cumulativeLineChart=function(){"use strict";function b(m){return K.reset(),K.models(g),t&&K.models(h),u&&K.models(i),m.each(function(m){function C(a,c){d3.select(b.container).style("cursor","ew-resize")}function G(a,b){J.x=d3.event.x,J.i=Math.round(I.invert(J.x)),N()}function K(a,c){d3.select(b.container).style("cursor","auto"),A.index=J.i,E.stateChange(A)}function N(){ba.data([J]);var a=b.duration();b.duration(0),b.update(),b.duration(a)}var O=d3.select(this);a.utils.initSVG(O),O.classed("nv-chart-"+z,!0);var P=a.utils.availableWidth(q,O,n),Q=a.utils.availableHeight(r,O,n);if(b.update=function(){0===F?O.call(b):O.transition().duration(F).call(b)},b.container=this,A.setter(M(m),b.update).getter(L(m)).update(),A.disabled=m.map(function(a){return!!a.disabled}),!B){var R;B={};for(R in A)A[R]instanceof Array?B[R]=A[R].slice(0):B[R]=A[R]}var S=d3.behavior.drag().on("dragstart",C).on("drag",G).on("dragend",K);if(!(m&&m.length&&m.filter(function(a){return a.values.length}).length))return a.utils.noData(b,O),b;O.selectAll(".nv-noData").remove(),e=g.xScale(),f=g.yScale(),I.domain([0,m[0].values.length-1]).range([0,P]).clamp(!0);var m=c(J.i,m);"undefined"==typeof H&&(H=d(m)),y?g.yDomain(null):(g.yDomain(H),g.clipEdge(!0));var T=x?"none":"all",U=O.selectAll("g.nv-wrap.nv-cumulativeLine").data([m]),V=U.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),W=U.select("g");if(V.append("g").attr("class","nv-interactive"),V.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),V.append("g").attr("class","nv-y nv-axis"),V.append("g").attr("class","nv-background"),V.append("g").attr("class","nv-linesWrap").style("pointer-events",T),V.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),V.append("g").attr("class","nv-legendWrap"),V.append("g").attr("class","nv-controlsWrap"),s?(j.width(P),W.select(".nv-legendWrap").datum(m).call(j),o||j.height()===n.top||(n.top=j.height(),Q=a.utils.availableHeight(r,O,n)),W.select(".nv-legendWrap").attr("transform","translate(0,"+-n.top+")")):W.select(".nv-legendWrap").selectAll("*").remove(),w){var X=[{key:"Re-scale y-axis",disabled:!y}];k.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),W.select(".nv-controlsWrap").datum(X).attr("transform","translate(0,"+-n.top+")").call(k)}else W.select(".nv-controlsWrap").selectAll("*").remove();U.attr("transform","translate("+n.left+","+n.top+")"),v&&W.select(".nv-y.nv-axis").attr("transform","translate("+P+",0)");var Y=m.filter(function(a){return a.tempDisabled});U.select(".tempDisabled").remove(),Y.length&&U.append("text").attr("class","tempDisabled").attr("x",P/2).attr("y","-.71em").style("text-anchor","end").text(Y.map(function(a){return a.key}).join(", ")+" values cannot be calculated for this time period."),x&&(l.width(P).height(Q).margin({left:n.left,top:n.top}).svgContainer(O).xScale(e),U.select(".nv-interactive").call(l)),V.select(".nv-background").append("rect"),W.select(".nv-background rect").attr("width",P).attr("height",Q),g.y(function(a){return a.display.y}).width(P).height(Q).color(m.map(function(a,b){return a.color||p(a,b)}).filter(function(a,b){return!m[b].disabled&&!m[b].tempDisabled}));var Z=W.select(".nv-linesWrap").datum(m.filter(function(a){return!a.disabled&&!a.tempDisabled}));Z.call(g),m.forEach(function(a,b){a.seriesIndex=b});var $=m.filter(function(a){return!a.disabled&&!!D(a)}),_=W.select(".nv-avgLinesWrap").selectAll("line").data($,function(a){return a.key}),aa=function(a){var b=f(D(a));return 0>b?0:b>Q?Q:b};_.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(a,b){return g.color()(a,a.seriesIndex)}).attr("x1",0).attr("x2",P).attr("y1",aa).attr("y2",aa),_.style("stroke-opacity",function(a){var b=f(D(a));return 0>b||b>Q?0:1}).attr("x1",0).attr("x2",P).attr("y1",aa).attr("y2",aa),_.exit().remove();var ba=Z.selectAll(".nv-indexLine").data([J]);ba.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(S),ba.attr("transform",function(a){return"translate("+I(a.i)+",0)"}).attr("height",Q),t&&(h.scale(e)._ticks(a.utils.calcTicksX(P/70,m)).tickSize(-Q,0),W.select(".nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),W.select(".nv-x.nv-axis").call(h)),u&&(i.scale(f)._ticks(a.utils.calcTicksY(Q/36,m)).tickSize(-P,0),W.select(".nv-y.nv-axis").call(i)),W.select(".nv-background rect").on("click",function(){J.x=d3.mouse(this)[0],J.i=Math.round(I.invert(J.x)),A.index=J.i,E.stateChange(A),N()}),g.dispatch.on("elementClick",function(a){J.i=a.pointIndex,J.x=I(J.i),A.index=J.i,E.stateChange(A),N()}),k.dispatch.on("legendClick",function(a,c){a.disabled=!a.disabled,y=!a.disabled,A.rescaleY=y,y||(H=d(m)),E.stateChange(A),b.update()}),j.dispatch.on("stateChange",function(a){for(var c in a)A[c]=a[c];E.stateChange(A),b.update()}),l.dispatch.on("elementMousemove",function(c){g.clearHighlights();var d,e,f,j=[];if(m.filter(function(a,b){return a.seriesIndex=b,!(a.disabled||a.tempDisabled)}).forEach(function(h,i){e=a.interactiveBisect(h.values,c.pointXValue,b.x()),g.highlightPoint(i,e,!0);var k=h.values[e];"undefined"!=typeof k&&("undefined"==typeof d&&(d=k),"undefined"==typeof f&&(f=b.xScale()(b.x()(k,e))),j.push({key:h.key,value:b.y()(k,e),color:p(h,h.seriesIndex)}))}),j.length>2){var k=b.yScale().invert(c.mouseY),n=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),o=.03*n,q=a.nearestValueIndex(j.map(function(a){return a.value}),k,o);null!==q&&(j[q].highlight=!0)}var r=h.tickFormat()(b.x()(d,e),e);l.tooltip.valueFormatter(function(a,b){return i.tickFormat()(a)}).data({value:r,series:j})(),l.renderGuideLine(f)}),l.dispatch.on("elementMouseout",function(a){g.clearHighlights()}),E.on("changeState",function(a){"undefined"!=typeof a.disabled&&(m.forEach(function(b,c){b.disabled=a.disabled[c]}),A.disabled=a.disabled),"undefined"!=typeof a.index&&(J.i=a.index,J.x=I(J.i),A.index=a.index,ba.data([J])),"undefined"!=typeof a.rescaleY&&(y=a.rescaleY),b.update()})}),K.renderEnd("cumulativeLineChart immediate"),b}function c(a,b){return N||(N=g.y()),b.map(function(b,c){if(!b.values)return b;var d=b.values[a];if(null==d)return b;var e=N(d,a);return Math.abs(e)<1e-5&&!G?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(N(a,b)-e)/e},a}),b)})}function d(a){var b=a.filter(function(a){return!(a.disabled||a.tempDisabled)}).map(function(a,b){return d3.extent(a.values,function(a){return a.display.y})});return[d3.min(b,function(a){return a[0]}),d3.max(b,function(a){return a[1]})]}var e,f,g=a.models.line(),h=a.models.axis(),i=a.models.axis(),j=a.models.legend(),k=a.models.legend(),l=a.interactiveGuideline(),m=a.models.tooltip(),n={top:30,right:30,bottom:50,left:60},o=null,p=a.utils.defaultColor(),q=null,r=null,s=!0,t=!0,u=!0,v=!1,w=!0,x=!1,y=!0,z=g.id(),A=a.utils.state(),B=null,C=null,D=function(a){return a.average},E=d3.dispatch("stateChange","changeState","renderEnd"),F=250,G=!1;A.index=0,A.rescaleY=y,h.orient("bottom").tickPadding(7),i.orient(v?"right":"left"),m.valueFormatter(function(a,b){return i.tickFormat()(a,b)}).headerFormatter(function(a,b){return h.tickFormat()(a,b)}),k.updateState(!1);var H,I=d3.scale.linear(),J={i:0,x:0},K=a.utils.renderWatch(E,F),L=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),index:J.i,rescaleY:y}}},M=function(a){return function(b){void 0!==b.index&&(J.i=b.index),void 0!==b.rescaleY&&(y=b.rescaleY),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};g.dispatch.on("elementMouseover.tooltip",function(a){var c={x:b.x()(a.point),y:b.y()(a.point),color:a.point.color};a.point=c,m.data(a).hidden(!1)}),g.dispatch.on("elementMouseout.tooltip",function(a){m.hidden(!0)});var N=null;return b.dispatch=E,b.lines=g,b.legend=j,b.controls=k,b.xAxis=h,b.yAxis=i,b.interactiveLayer=l,b.state=A,b.tooltip=m,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return q},set:function(a){q=a}},height:{get:function(){return r},set:function(a){r=a}},showControls:{get:function(){return w},set:function(a){w=a}},showLegend:{get:function(){return s},set:function(a){s=a}},average:{get:function(){return D},set:function(a){D=a}},defaultState:{get:function(){return B},set:function(a){B=a}},noData:{get:function(){return C},set:function(a){C=a}},showXAxis:{get:function(){return t},set:function(a){t=a}},showYAxis:{get:function(){return u},set:function(a){u=a}},noErrorCheck:{get:function(){return G},set:function(a){G=a}},rescaleY:{get:function(){return y},set:function(a){y=a,b.state.rescaleY=a}},margin:{get:function(){return n},set:function(a){void 0!==a.top&&(n.top=a.top,o=a.top),n.right=void 0!==a.right?a.right:n.right,n.bottom=void 0!==a.bottom?a.bottom:n.bottom,n.left=void 0!==a.left?a.left:n.left}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b),j.color(p)}},useInteractiveGuideline:{get:function(){return x},set:function(a){x=a,a===!0&&(b.interactive(!1),b.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return v},set:function(a){v=a,i.orient(a?"right":"left")}},duration:{get:function(){return F},set:function(a){F=a,g.duration(F),h.duration(F),i.duration(F),K.reset(F)}}}),a.utils.inheritOptions(b,g),a.utils.initOptions(b),b},a.models.discreteBar=function(){"use strict";function b(m){return y.reset(),m.each(function(b){var m=k-j.left-j.right,x=l-j.top-j.bottom;c=d3.select(this),a.utils.initSVG(c),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var z=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),y0:a.y0}})});n.domain(d||d3.merge(z).map(function(a){return a.x})).rangeBands(f||[0,m],.1),o.domain(e||d3.extent(d3.merge(z).map(function(a){return a.y}).concat(r))),t?o.range(g||[x-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]):o.range(g||[x,0]),h=h||n,i=i||o.copy().range([o(0),o(0)]);var A=c.selectAll("g.nv-wrap.nv-discretebar").data([b]),B=A.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),C=B.append("g");A.select("g");C.append("g").attr("class","nv-groups"),A.attr("transform","translate("+j.left+","+j.top+")");var D=A.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});D.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),D.exit().watchTransition(y,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),D.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),D.watchTransition(y,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var E=D.selectAll("g.nv-bar").data(function(a){return a.values});E.exit().remove();var F=E.enter().append("g").attr("transform",function(a,b,c){return"translate("+(n(p(a,b))+.05*n.rangeBand())+", "+o(0)+")"}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),v.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),v.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){v.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){var c=this;v.elementClick({data:a,index:b,color:d3.select(this).style("fill"),event:d3.event,element:c}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});F.append("rect").attr("height",0).attr("width",.9*n.rangeBand()/b.length),t?(F.append("text").attr("text-anchor","middle"),E.select("text").text(function(a,b){return u(q(a,b))}).watchTransition(y,"discreteBar: bars text").attr("x",.9*n.rangeBand()/2).attr("y",function(a,b){return q(a,b)<0?o(q(a,b))-o(0)+12:-4})):E.selectAll("text").remove(),E.attr("class",function(a,b){return q(a,b)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(a,b){return a.color||s(a,b)}).style("stroke",function(a,b){return a.color||s(a,b)}).select("rect").attr("class",w).watchTransition(y,"discreteBar: bars rect").attr("width",.9*n.rangeBand()/b.length),E.watchTransition(y,"discreteBar: bars").attr("transform",function(a,b){var c=n(p(a,b))+.05*n.rangeBand(),d=q(a,b)<0?o(0):o(0)-o(q(a,b))<1?o(0)-1:o(q(a,b));return"translate("+c+", "+d+")"}).select("rect").attr("height",function(a,b){return Math.max(Math.abs(o(q(a,b))-o(0)),1)}),h=n.copy(),i=o.copy()}),y.renderEnd("discreteBar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=d3.scale.ordinal(),o=d3.scale.linear(),p=function(a){ +return a.x},q=function(a){return a.y},r=[0],s=a.utils.defaultColor(),t=!1,u=d3.format(",.2f"),v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),w="discreteBar",x=250,y=a.utils.renderWatch(v,x);return b.dispatch=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},forceY:{get:function(){return r},set:function(a){r=a}},showValues:{get:function(){return t},set:function(a){t=a}},x:{get:function(){return p},set:function(a){p=a}},y:{get:function(){return q},set:function(a){q=a}},xScale:{get:function(){return n},set:function(a){n=a}},yScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},valueFormat:{get:function(){return u},set:function(a){u=a}},id:{get:function(){return m},set:function(a){m=a}},rectClass:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b)}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x)}}}),a.utils.initOptions(b),b},a.models.discreteBarChart=function(){"use strict";function b(i){return y.reset(),y.models(e),p&&y.models(f),q&&y.models(g),i.each(function(i){var n=d3.select(this);a.utils.initSVG(n);var v=a.utils.availableWidth(l,n,j),y=a.utils.availableHeight(m,n,j);if(b.update=function(){w.beforeUpdate(),n.transition().duration(x).call(b)},b.container=this,!(i&&i.length&&i.filter(function(a){return a.values.length}).length))return a.utils.noData(b,n),b;n.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var z=n.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([i]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),B=A.append("defs"),C=z.select("g");A.append("g").attr("class","nv-x nv-axis"),A.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),A.append("g").attr("class","nv-barsWrap"),A.append("g").attr("class","nv-legendWrap"),C.attr("transform","translate("+j.left+","+j.top+")"),o?(h.width(v),C.select(".nv-legendWrap").datum(i).call(h),k||h.height()===j.top||(j.top=h.height(),y=a.utils.availableHeight(m,n,j)),z.select(".nv-legendWrap").attr("transform","translate(0,"+-j.top+")")):C.select(".nv-legendWrap").selectAll("*").remove(),r&&C.select(".nv-y.nv-axis").attr("transform","translate("+v+",0)"),e.width(v).height(y);var D=C.select(".nv-barsWrap").datum(i.filter(function(a){return!a.disabled}));if(D.transition().call(e),B.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),C.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(s?2:1)).attr("height",16).attr("x",-c.rangeBand()/(s?1:2)),p){f.scale(c)._ticks(a.utils.calcTicksX(v/100,i)).tickSize(-y,0),C.select(".nv-x.nv-axis").attr("transform","translate(0,"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+")"),C.select(".nv-x.nv-axis").call(f);var E=C.select(".nv-x.nv-axis").selectAll("g");s&&E.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"}),u&&E.selectAll(".tick text").attr("transform","rotate("+u+" 0,0)").style("text-anchor",u>0?"start":"end"),t&&C.selectAll(".tick text").call(a.utils.wrapTicks,b.xAxis.rangeBand())}q&&(g.scale(d)._ticks(a.utils.calcTicksY(y/36,i)).tickSize(-v,0),C.select(".nv-y.nv-axis").call(g)),C.select(".nv-zeroLine line").attr("x1",0).attr("x2",r?-v:v).attr("y1",d(0)).attr("y2",d(0))}),y.renderEnd("discreteBar chart immediate"),b}var c,d,e=a.models.discreteBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.tooltip(),j={top:15,right:10,bottom:50,left:60},k=null,l=null,m=null,n=a.utils.getColor(),o=!1,p=!0,q=!0,r=!1,s=!1,t=!1,u=0,v=null,w=d3.dispatch("beforeUpdate","renderEnd"),x=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(r?"right":"left").tickFormat(d3.format(",.1f")),i.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).keyFormatter(function(a,b){return f.tickFormat()(a,b)});var y=a.utils.renderWatch(w,x);return e.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},i.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){i.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(a){i()}),b.dispatch=w,b.discretebar=e,b.legend=h,b.xAxis=f,b.yAxis=g,b.tooltip=i,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return o},set:function(a){o=a}},staggerLabels:{get:function(){return s},set:function(a){s=a}},rotateLabels:{get:function(){return u},set:function(a){u=a}},wrapLabels:{get:function(){return t},set:function(a){t=!!a}},showXAxis:{get:function(){return p},set:function(a){p=a}},showYAxis:{get:function(){return q},set:function(a){q=a}},noData:{get:function(){return v},set:function(a){v=a}},margin:{get:function(){return j},set:function(a){void 0!==a.top&&(j.top=a.top,k=a.top),j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x),e.duration(x),f.duration(x),g.duration(x)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),e.color(n),h.color(n)}},rightAlignYAxis:{get:function(){return r},set:function(a){r=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.distribution=function(){"use strict";function b(k){return m.reset(),k.each(function(b){var k=(e-("x"===g?d.left+d.right:d.top+d.bottom),"x"==g?"y":"x"),l=d3.select(this);a.utils.initSVG(l),c=c||j;var n=l.selectAll("g.nv-distribution").data([b]),o=n.enter().append("g").attr("class","nvd3 nv-distribution"),p=(o.append("g"),n.select("g"));n.attr("transform","translate("+d.left+","+d.top+")");var q=p.selectAll("g.nv-dist").data(function(a){return a},function(a){return a.key});q.enter().append("g"),q.attr("class",function(a,b){return"nv-dist nv-series-"+b}).style("stroke",function(a,b){return i(a,b)});var r=q.selectAll("line.nv-dist"+g).data(function(a){return a.values});r.enter().append("line").attr(g+"1",function(a,b){return c(h(a,b))}).attr(g+"2",function(a,b){return c(h(a,b))}),m.transition(q.exit().selectAll("line.nv-dist"+g),"dist exit").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}).style("stroke-opacity",0).remove(),r.attr("class",function(a,b){return"nv-dist"+g+" nv-dist"+g+"-"+b}).attr(k+"1",0).attr(k+"2",f),m.transition(r,"dist").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}),c=j.copy()}),m.renderEnd("distribution immediate"),b}var c,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g="x",h=function(a){return a[g]},i=a.utils.defaultColor(),j=d3.scale.linear(),k=250,l=d3.dispatch("renderEnd"),m=a.utils.renderWatch(l,k);return b.options=a.utils.optionsFunc.bind(b),b.dispatch=l,b.margin=function(a){return arguments.length?(d.top="undefined"!=typeof a.top?a.top:d.top,d.right="undefined"!=typeof a.right?a.right:d.right,d.bottom="undefined"!=typeof a.bottom?a.bottom:d.bottom,d.left="undefined"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.axis=function(a){return arguments.length?(g=a,b):g},b.size=function(a){return arguments.length?(f=a,b):f},b.getData=function(a){return arguments.length?(h=d3.functor(a),b):h},b.scale=function(a){return arguments.length?(j=a,b):j},b.color=function(c){return arguments.length?(i=a.utils.getColor(c),b):i},b.duration=function(a){return arguments.length?(k=a,m.reset(k),b):k},b},a.models.focus=function(b){"use strict";function c(u){return t.reset(),t.models(b),m&&t.models(f),n&&t.models(g),u.each(function(t){function u(a){var b=+("e"==a),c=b?1:-1,d=z/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function v(){h.empty()||h.extent(p),E.data([h.empty()?d.domain():p]).each(function(a,b){var c=d(a[0])-d.range()[0],e=y-d(a[1]);d3.select(this).select(".left").attr("width",0>c?0:c),d3.select(this).select(".right").attr("x",d(a[1])).attr("width",0>e?0:e)})}function w(a){p=h.empty()?null:h.extent();var b=h.empty()?d.domain():h.extent();r.brush({extent:b,brush:h}),v(),a&&r.onBrush(b)}var x=d3.select(this);a.utils.initSVG(x);var y=a.utils.availableWidth(k,x,i),z=l-i.top-i.bottom;c.update=function(){0===q?x.call(c):x.transition().duration(q).call(c)},c.container=this,d=b.xScale(),e=b.yScale();var A=x.selectAll("g.nv-focus").data([t]),B=A.enter().append("g").attr("class","nvd3 nv-focus").append("g"),C=A.select("g");A.attr("transform","translate("+i.left+","+i.top+")"),B.append("g").attr("class","nv-background").append("rect"),B.append("g").attr("class","nv-x nv-axis"),B.append("g").attr("class","nv-y nv-axis"),B.append("g").attr("class","nv-contentWrap"),B.append("g").attr("class","nv-brushBackground"),B.append("g").attr("class","nv-x nv-brush"),o&&C.select(".nv-y.nv-axis").attr("transform","translate("+y+",0)"),C.select(".nv-background rect").attr("width",y).attr("height",z),b.width(y).height(z).color(t.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!t[b].disabled}));var D=C.select(".nv-contentWrap").datum(t.filter(function(a){return!a.disabled}));d3.transition(D).call(b),h.x(d).on("brush",function(){w(s)}),h.on("brushend",function(){s||r.onBrush(h.empty()?d.domain():h.extent())}),p&&h.extent(p);var E=C.select(".nv-brushBackground").selectAll("g").data([p||h.extent()]),F=E.enter().append("g");F.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",z),F.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",z);var G=C.select(".nv-x.nv-brush").call(h);G.selectAll("rect").attr("height",z),G.selectAll(".resize").append("path").attr("d",u),w(!0),C.select(".nv-background rect").attr("width",y).attr("height",z),m&&(f.scale(d)._ticks(a.utils.calcTicksX(y/100,t)).tickSize(-z,0),C.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),d3.transition(C.select(".nv-x.nv-axis")).call(f)),n&&(g.scale(e)._ticks(a.utils.calcTicksY(z/36,t)).tickSize(-y,0),d3.transition(C.select(".nv-y.nv-axis")).call(g)),C.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")")}),t.renderEnd("focus immediate"),c}var d,e,b=b||a.models.line(),f=a.models.axis(),g=a.models.axis(),h=d3.svg.brush(),i={top:10,right:0,bottom:30,left:0},j=a.utils.defaultColor(),k=null,l=70,m=!0,n=!1,o=!1,p=null,q=250,r=d3.dispatch("brush","onBrush","renderEnd"),s=!0;b.interactive(!1),b.pointActive(function(a){return!1});var t=a.utils.renderWatch(r,q);return c.dispatch=r,c.content=b,c.brush=h,c.xAxis=f,c.yAxis=g,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},showXAxis:{get:function(){return m},set:function(a){m=a}},showYAxis:{get:function(){return n},set:function(a){n=a}},brushExtent:{get:function(){return p},set:function(a){p=a}},syncBrushing:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},duration:{get:function(){return q},set:function(a){q=a,t.reset(q),b.duration(q),f.duration(q),g.duration(q)}},color:{get:function(){return j},set:function(c){j=a.utils.getColor(c),b.color(j)}},interpolate:{get:function(){return b.interpolate()},set:function(a){b.interpolate(a)}},xTickFormat:{get:function(){return f.tickFormat()},set:function(a){f.tickFormat(a)}},yTickFormat:{get:function(){return g.tickFormat()},set:function(a){g.tickFormat(a)}},x:{get:function(){return b.x()},set:function(a){b.x(a)}},y:{get:function(){return b.y()},set:function(a){b.y(a)}},rightAlignYAxis:{get:function(){return o},set:function(a){o=a,g.orient(o?"right":"left")}}}),a.utils.inheritOptions(c,b),a.utils.initOptions(c),c},a.models.forceDirectedGraph=function(){"use strict";function b(g){return w.reset(),g.each(function(g){f=d3.select(this),a.utils.initSVG(f);var j=a.utils.availableWidth(d,f,c),u=a.utils.availableHeight(e,f,c);if(f.attr("width",j).attr("height",u),!(g&&g.links&&g.nodes))return a.utils.noData(b,f),b;f.selectAll(".nv-noData").remove(),f.selectAll("*").remove();var v=new Set;g.nodes.forEach(function(a){var b=Object.keys(a);b.forEach(function(a){v.add(a)})});var w=d3.layout.force().nodes(g.nodes).links(g.links).size([j,u]).linkStrength(k).friction(l).linkDistance(m).charge(n).gravity(o).theta(p).alpha(q).start(),x=f.selectAll(".link").data(g.links).enter().append("line").attr("class","nv-force-link").style("stroke-width",function(a){return Math.sqrt(a.value)}),y=f.selectAll(".node").data(g.nodes).enter().append("g").attr("class","nv-force-node").call(w.drag);y.append("circle").attr("r",r).style("fill",function(a){return h(a)}).on("mouseover",function(a){f.select(".nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.py),f.select(".nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.px);var b=h(a);a.series=[],v.forEach(function(c){a.series.push({color:b,key:c,value:a[c]})}),i.data(a).hidden(!1)}).on("mouseout",function(a){i.hidden(!0)}),i.headerFormatter(function(a){return"Node"}),t(x),s(y),w.on("tick",function(){x.attr("x1",function(a){return a.source.x}).attr("y1",function(a){return a.source.y}).attr("x2",function(a){return a.target.x}).attr("y2",function(a){return a.target.y}),y.attr("transform",function(a){return"translate("+a.x+", "+a.y+")"})})}),b}var c={top:2,right:0,bottom:2,left:0},d=400,e=32,f=null,g=d3.dispatch("renderEnd"),h=a.utils.getColor(["#000"]),i=a.models.tooltip(),j=null,k=.1,l=.9,m=30,n=-120,o=.1,p=.8,q=.1,r=5,s=function(a){},t=function(a){},u=d3.functor(0),v=d3.functor(0),w=a.utils.renderWatch(g);return b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},linkStrength:{get:function(){return k},set:function(a){k=a}},friction:{get:function(){return l},set:function(a){l=a}},linkDist:{get:function(){return m},set:function(a){m=a}},charge:{get:function(){return n},set:function(a){n=a}},gravity:{get:function(){return o},set:function(a){o=a}},theta:{get:function(){return p},set:function(a){p=a}},alpha:{get:function(){return q},set:function(a){q=a}},radius:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return u},set:function(a){u=d3.functor(a)}},y:{get:function(){return v},set:function(a){v=d3.functor(a)}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}},noData:{get:function(){return j},set:function(a){j=a}},nodeExtras:{get:function(){return s},set:function(a){s=a}},linkExtras:{get:function(){return t},set:function(a){t=a}}}),b.dispatch=g,b.tooltip=i,a.utils.initOptions(b),b},a.models.furiousLegend=function(){"use strict";function b(r){function s(a,b){return"furious"!=q?"#000":o?a.disengaged?h(a,b):"#fff":o?void 0:a.disabled?h(a,b):"#fff"}function t(a,b){return o&&"furious"==q?a.disengaged?"#fff":h(a,b):a.disabled?"#fff":h(a,b)}return r.each(function(b){var r=d-c.left-c.right,u=d3.select(this);a.utils.initSVG(u);var v=u.selectAll("g.nv-legend").data([b]),w=(v.enter().append("g").attr("class","nvd3 nv-legend").append("g"),v.select("g"));v.attr("transform","translate("+c.left+","+c.top+")");var x,y=w.selectAll(".nv-series").data(function(a){return"furious"!=q?a:a.filter(function(a){return o?!0:!a.disengaged})}),z=y.enter().append("g").attr("class","nv-series");if("classic"==q)z.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),x=y.select("circle");else if("furious"==q){z.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),x=y.select("rect"),z.append("g").attr("class","nv-check-box").property("innerHTML",'').attr("transform","translate(-10,-8)scale(0.5)");var A=y.select(".nv-check-box");A.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",s(a,b))})}z.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var B=y.select("text.nv-legend-text");y.on("mouseover",function(a,b){p.legendMouseover(a,b)}).on("mouseout",function(a,b){p.legendMouseout(a,b)}).on("click",function(a,b){p.legendClick(a,b);var c=y.data();if(m){if("classic"==q)n?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==q)if(o)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!o){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}p.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(("furious"!=q||!o)&&(p.legendDblclick(a,b),m)){var c=y.data();c.forEach(function(a){a.disabled=!0,"furious"==q&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==q&&(a.userDisabled=a.disabled),p.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),y.classed("nv-disabled",function(a){return a.userDisabled}),y.exit().remove(),B.attr("fill",s).text(function(a){return g(f(a))});var C;switch(q){case"furious":C=23;break;case"classic":C=20}if(j){var D=[];y.each(function(b,c){var d;if(g(f(b))&&g(f(b)).length>i){var e=g(f(b)).substring(0,i);d=d3.select(this).select("text").text(e+"..."),d3.select(this).append("svg:title").text(g(f(b)))}else d=d3.select(this).select("text");var h;try{if(h=d.node().getComputedTextLength(),0>=h)throw Error()}catch(j){h=a.utils.calcApproxTextWidth(d)}D.push(h+k)});for(var E=0,F=0,G=[];r>F&&Er&&E>1;){G=[],E--;for(var H=0;H(G[H%E]||0)&&(G[H%E]=D[H]);F=G.reduce(function(a,b,c,d){return a+b})}for(var I=[],J=0,K=0;E>J;J++)I[J]=K,K+=G[J];y.attr("transform",function(a,b){return"translate("+I[b%E]+","+(5+Math.floor(b/E)*C)+")"}),l?w.attr("transform","translate("+(d-c.right-F)+","+c.top+")"):w.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(D.length/E)*C}else{var L,M=5,N=5,O=0;y.attr("transform",function(a,b){var e=d3.select(this).select("text").node().getComputedTextLength()+k;return L=N,dO&&(O=N),"translate("+L+","+M+")"}),w.attr("transform","translate("+(d-c.right-O)+","+c.top+")"),e=c.top+c.bottom+M+15}"furious"==q&&x.attr("width",function(a,b){return B[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),x.style("fill",t).style("stroke",function(a,b){return a.color||h(a,b)})}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=function(a){return a},h=a.utils.getColor(),i=20,j=!0,k=28,l=!0,m=!0,n=!1,o=!1,p=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),q="classic";return b.dispatch=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},keyFormatter:{get:function(){return g},set:function(a){g=a}},align:{get:function(){return j},set:function(a){j=a}},rightAlign:{get:function(){return l},set:function(a){l=a}},maxKeyLength:{get:function(){return i},set:function(a){i=a}},padding:{get:function(){return k},set:function(a){k=a}},updateState:{get:function(){return m},set:function(a){m=a}},radioButtonMode:{get:function(){return n},set:function(a){n=a}},expanded:{get:function(){return o},set:function(a){o=a}},vers:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBar=function(){"use strict";function b(x){return x.each(function(b){w.reset(),k=d3.select(this);var x=a.utils.availableWidth(h,k,g),y=a.utils.availableHeight(i,k,g);a.utils.initSVG(k),l.domain(c||d3.extent(b[0].values.map(n).concat(p))),r?l.range(e||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]):l.range(e||[0,x]),m.domain(d||d3.extent(b[0].values.map(o).concat(q))).range(f||[y,0]),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1]));var z=k.selectAll("g.nv-wrap.nv-historicalBar-"+j).data([b[0].values]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+j),B=A.append("defs"),C=A.append("g"),D=z.select("g");C.append("g").attr("class","nv-bars"),z.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){u.chartClick({data:a,index:b,pos:d3.event,id:j})}),B.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),z.select("#nv-chart-clip-path-"+j+" rect").attr("width",x).attr("height",y),D.attr("clip-path",s?"url(#nv-chart-clip-path-"+j+")":"");var E=z.select(".nv-bars").selectAll(".nv-bar").data(function(a){return a},function(a,b){return n(a,b)});E.exit().remove(),E.enter().append("rect").attr("x",0).attr("y",function(b,c){return a.utils.NaNtoZero(m(Math.max(0,o(b,c))))}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.abs(m(o(b,c))-m(0)))}).attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).on("mouseover",function(a,b){v&&(d3.select(this).classed("hover",!0),u.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mouseout",function(a,b){v&&(d3.select(this).classed("hover",!1),u.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mousemove",function(a,b){v&&u.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){if(v){var c=this;u.elementClick({data:a,index:b,color:d3.select(this).style("fill"),event:d3.event,element:c}),d3.event.stopPropagation()}}).on("dblclick",function(a,b){v&&(u.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}),E.attr("fill",function(a,b){return t(a,b)}).attr("class",function(a,b,c){return(o(a,b)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+c+"-"+b}).watchTransition(w,"bars").attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).attr("width",x/b[0].values.length*.9),E.watchTransition(w,"bars").attr("y",function(b,c){var d=o(b,c)<0?m(0):m(0)-m(o(b,c))<1?m(0)-1:m(o(b,c));return a.utils.NaNtoZero(d)}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.max(Math.abs(m(o(b,c))-m(0)),1))})}),w.renderEnd("historicalBar immediate"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[],q=[0],r=!1,s=!0,t=a.utils.defaultColor(),u=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),v=!0,w=a.utils.renderWatch(u,0);return b.highlightPoint=function(a,b){k.select(".nv-bars .nv-bar-0-"+a).classed("hover",b)},b.clearHighlights=function(){k.select(".nv-bars .nv-bar.hover").classed("hover",!1)},b.dispatch=u,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},forceX:{get:function(){return p},set:function(a){p=a}},forceY:{get:function(){return q},set:function(a){q=a}},padData:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},clipEdge:{get:function(){return s},set:function(a){s=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return v},set:function(a){v=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return t},set:function(b){t=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBarChart=function(b){"use strict";function c(b){return b.each(function(k){A.reset(),A.models(f),r&&A.models(g),s&&A.models(h);var x=d3.select(this);a.utils.initSVG(x);var B=a.utils.availableWidth(o,x,l),C=a.utils.availableHeight(p,x,l);if(c.update=function(){x.transition().duration(z).call(c)},c.container=this,v.disabled=k.map(function(a){return!!a.disabled}),!w){var D;w={};for(D in v)v[D]instanceof Array?w[D]=v[D].slice(0):w[D]=v[D]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(c,x),c;x.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale();var E=x.selectAll("g.nv-wrap.nv-historicalBarChart").data([k]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),G=E.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),q?(i.width(B),G.select(".nv-legendWrap").datum(k).call(i),m||i.height()===l.top||(l.top=i.height(),C=a.utils.availableHeight(p,x,l)),E.select(".nv-legendWrap").attr("transform","translate(0,"+-l.top+")")):G.select(".nv-legendWrap").selectAll("*").remove(),E.attr("transform","translate("+l.left+","+l.top+")"),t&&G.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),u&&(j.width(B).height(C).margin({left:l.left,top:l.top}).svgContainer(x).xScale(d),E.select(".nv-interactive").call(j)),f.width(B).height(C).color(k.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!k[b].disabled}));var H=G.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));H.transition().call(f),r&&(g.scale(d)._ticks(a.utils.calcTicksX(B/100,k)).tickSize(-C,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),G.select(".nv-x.nv-axis").transition().call(g)),s&&(h.scale(e)._ticks(a.utils.calcTicksY(C/36,k)).tickSize(-B,0),G.select(".nv-y.nv-axis").transition().call(h)),j.dispatch.on("elementMousemove",function(b){f.clearHighlights();var d,e,i,l=[];k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g,h){e=a.interactiveBisect(g.values,b.pointXValue,c.x()),f.highlightPoint(e,!0);var j=g.values[e];void 0!==j&&(void 0===d&&(d=j),void 0===i&&(i=c.xScale()(c.x()(j,e))),l.push({key:g.key,value:c.y()(j,e),color:n(g,g.seriesIndex),data:g.values[e]}))});var m=g.tickFormat()(c.x()(d,e));j.tooltip.valueFormatter(function(a,b){return h.tickFormat()(a)}).data({value:m,index:e,series:l})(),j.renderGuideLine(i)}),j.dispatch.on("elementMouseout",function(a){y.tooltipHide(),f.clearHighlights()}),i.dispatch.on("legendClick",function(a,d){a.disabled=!a.disabled,k.filter(function(a){return!a.disabled}).length||k.map(function(a){return a.disabled=!1,E.selectAll(".nv-series").classed("disabled",!1),a}),v.disabled=k.map(function(a){return!!a.disabled}),y.stateChange(v),b.transition().call(c)}),i.dispatch.on("legendDblclick",function(a){k.forEach(function(a){a.disabled=!0}),a.disabled=!1,v.disabled=k.map(function(a){return!!a.disabled}),y.stateChange(v),c.update()}),y.on("changeState",function(a){"undefined"!=typeof a.disabled&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),v.disabled=a.disabled),c.update()})}),A.renderEnd("historicalBarChart immediate"),c}var d,e,f=b||a.models.historicalBar(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:90,bottom:50,left:90},m=null,n=a.utils.defaultColor(),o=null,p=null,q=!1,r=!0,s=!0,t=!1,u=!1,v={},w=null,x=null,y=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),z=250;g.orient("bottom").tickPadding(7),h.orient(t?"right":"left"),k.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)});var A=a.utils.renderWatch(y,0);return f.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:c.x()(a.data),value:c.y()(a.data),color:a.color},k.data(a).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(a){k.hidden(!0)}),f.dispatch.on("elementMousemove.tooltip",function(a){k()}),c.dispatch=y,c.bars=f,c.legend=i,c.xAxis=g,c.yAxis=h,c.interactiveLayer=j,c.tooltip=k,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return w},set:function(a){w=a}},noData:{get:function(){return x},set:function(a){x=a}},margin:{get:function(){return l},set:function(a){void 0!==a.top&&(l.top=a.top,m=a.top),l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),i.color(n),f.color(n)}},duration:{get:function(){return z},set:function(a){z=a,A.reset(z),h.duration(z),g.duration(z)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,h.orient(a?"right":"left")}},useInteractiveGuideline:{get:function(){return u},set:function(a){u=a,a===!0&&c.interactive(!1)}}}),a.utils.inheritOptions(c,f),a.utils.initOptions(c),c},a.models.ohlcBarChart=function(){var b=a.models.historicalBarChart(a.models.ohlcBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"
open:"+b.yAxis.tickFormat()(c.open)+"
close:"+b.yAxis.tickFormat()(c.close)+"
high"+b.yAxis.tickFormat()(c.high)+"
low:"+b.yAxis.tickFormat()(c.low)+"
"; +}),b},a.models.candlestickBarChart=function(){var b=a.models.historicalBarChart(a.models.candlestickBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"
open:"+b.yAxis.tickFormat()(c.open)+"
close:"+b.yAxis.tickFormat()(c.close)+"
high"+b.yAxis.tickFormat()(c.high)+"
low:"+b.yAxis.tickFormat()(c.low)+"
"}),b},a.models.legend=function(){"use strict";function b(s){function t(a,b){return"furious"!=r?"#000":p?a.disengaged?"#000":"#fff":p?void 0:(a.color||(a.color=h(a,b)),a.disabled?a.color:"#fff")}function u(a,b){return p&&"furious"==r&&a.disengaged?"#eee":a.color||h(a,b)}function v(a,b){return p&&"furious"==r?1:a.disabled?0:1}return s.each(function(b){var h=d-c.left-c.right,s=d3.select(this);a.utils.initSVG(s);var w=s.selectAll("g.nv-legend").data([b]),x=w.enter().append("g").attr("class","nvd3 nv-legend").append("g"),y=w.select("g");l?w.attr("transform","translate("+-c.right+","+c.top+")"):w.attr("transform","translate("+c.left+","+c.top+")");var z,A,B=y.selectAll(".nv-series").data(function(a){return"furious"!=r?a:a.filter(function(a){return p?!0:!a.disengaged})}),C=B.enter().append("g").attr("class","nv-series");switch(r){case"furious":A=23;break;case"classic":A=20}if("classic"==r)C.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),z=B.select(".nv-legend-symbol");else if("furious"==r){C.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),z=B.select(".nv-legend-symbol"),C.append("g").attr("class","nv-check-box").property("innerHTML",'').attr("transform","translate(-10,-8)scale(0.5)");var D=B.select(".nv-check-box");D.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",t(a,b))})}C.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var E=B.select("text.nv-legend-text");B.on("mouseover",function(a,b){q.legendMouseover(a,b)}).on("mouseout",function(a,b){q.legendMouseout(a,b)}).on("click",function(a,b){q.legendClick(a,b);var c=B.data();if(m){if("classic"==r)o?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==r)if(p)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!p){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}q.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(n){if("furious"==r&&p)return;if(q.legendDblclick(a,b),m){var c=B.data();c.forEach(function(a){a.disabled=!0,"furious"==r&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==r&&(a.userDisabled=a.disabled),q.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}}),B.classed("nv-disabled",function(a){return a.userDisabled}),B.exit().remove(),E.attr("fill",t).text(function(a){return g(f(a))});var F=0;if(j){var G=[];B.each(function(b,c){var d;if(g(f(b))&&g(f(b)).length>i){var e=g(f(b)).substring(0,i);d=d3.select(this).select("text").text(e+"..."),d3.select(this).append("svg:title").text(g(f(b)))}else d=d3.select(this).select("text");var h;try{if(h=d.node().getComputedTextLength(),0>=h)throw Error()}catch(j){h=a.utils.calcApproxTextWidth(d)}G.push(h+k)});var H=0,I=[];for(F=0;h>F&&Hh&&H>1;){I=[],H--;for(var J=0;J(I[J%H]||0)&&(I[J%H]=G[J]);F=I.reduce(function(a,b,c,d){return a+b})}for(var K=[],L=0,M=0;H>L;L++)K[L]=M,M+=I[L];B.attr("transform",function(a,b){return"translate("+K[b%H]+","+(5+Math.floor(b/H)*A)+")"}),l?y.attr("transform","translate("+(d-c.right-F)+","+c.top+")"):y.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(G.length/H)*A}else{var N,O=5,P=5,Q=0;B.attr("transform",function(a,b){var e=d3.select(this).select("text").node().getComputedTextLength()+k;return N=P,dQ&&(Q=P),N+Q>F&&(F=N+Q),"translate("+N+","+O+")"}),y.attr("transform","translate("+(d-c.right-Q)+","+c.top+")"),e=c.top+c.bottom+O+15}if("furious"==r){z.attr("width",function(a,b){return E[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),x.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0);var R=y.select(".nv-legend-bg");R.transition().duration(300).attr("x",-A).attr("width",F+A-12).attr("height",e+10).attr("y",-c.top-10).attr("opacity",p?1:0)}z.style("fill",u).style("fill-opacity",v).style("stroke",u)}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=function(a){return a},h=a.utils.getColor(),i=20,j=!0,k=32,l=!0,m=!0,n=!0,o=!1,p=!1,q=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),r="classic";return b.dispatch=q,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},keyFormatter:{get:function(){return g},set:function(a){g=a}},align:{get:function(){return j},set:function(a){j=a}},maxKeyLength:{get:function(){return i},set:function(a){i=a}},rightAlign:{get:function(){return l},set:function(a){l=a}},padding:{get:function(){return k},set:function(a){k=a}},updateState:{get:function(){return m},set:function(a){m=a}},enableDoubleClick:{get:function(){return n},set:function(a){n=a}},radioButtonMode:{get:function(){return o},set:function(a){o=a}},expanded:{get:function(){return p},set:function(a){p=a}},vers:{get:function(){return r},set:function(a){r=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.line=function(){"use strict";function b(r){return v.reset(),v.models(e),r.each(function(b){i=d3.select(this);var r=a.utils.availableWidth(g,i,f),s=a.utils.availableHeight(h,i,f);a.utils.initSVG(i),c=e.xScale(),d=e.yScale(),t=t||c,u=u||d;var w=i.selectAll("g.nv-wrap.nv-line").data([b]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),y=x.append("defs"),z=x.append("g"),A=w.select("g");z.append("g").attr("class","nv-groups"),z.append("g").attr("class","nv-scatterWrap"),w.attr("transform","translate("+f.left+","+f.top+")"),e.width(r).height(s);var B=w.select(".nv-scatterWrap");B.call(e),y.append("clipPath").attr("id","nv-edge-clip-"+e.id()).append("rect"),w.select("#nv-edge-clip-"+e.id()+" rect").attr("width",r).attr("height",s>0?s:0),A.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":""),B.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":"");var C=w.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});C.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",function(a){return a.strokeWidth||j}).style("fill-opacity",1e-6),C.exit().remove(),C.attr("class",function(a,b){return(a.classed||"")+" nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return k(a,b)}).style("stroke",function(a,b){return k(a,b)}),C.watchTransition(v,"line: groups").style("stroke-opacity",1).style("fill-opacity",function(a){return a.fillOpacity||.5});var D=C.selectAll("path.nv-area").data(function(a){return o(a)?[a]:[]});D.enter().append("path").attr("class","nv-area").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y0(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))}).y1(function(a,b){return u(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])}),C.exit().selectAll("path.nv-area").remove(),D.watchTransition(v,"line: areaPaths").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y0(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))}).y1(function(a,b){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])});var E=C.selectAll("path.nv-line").data(function(a){return[a.values]});E.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))})),E.watchTransition(v,"line: linePaths").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))})),t=c.copy(),u=d.copy()}),v.renderEnd("line immediate"),b}var c,d,e=a.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=null,j=1.5,k=a.utils.defaultColor(),l=function(a){return a.x},m=function(a){return a.y},n=function(a,b){return!isNaN(m(a,b))&&null!==m(a,b)},o=function(a){return a.area},p=!1,q="linear",r=250,s=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");e.pointSize(16).pointDomain([16,256]);var t,u,v=a.utils.renderWatch(s,r);return b.dispatch=s,b.scatter=e,e.dispatch.on("elementClick",function(){s.elementClick.apply(this,arguments)}),e.dispatch.on("elementMouseover",function(){s.elementMouseover.apply(this,arguments)}),e.dispatch.on("elementMouseout",function(){s.elementMouseout.apply(this,arguments)}),b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},defined:{get:function(){return n},set:function(a){n=a}},interpolate:{get:function(){return q},set:function(a){q=a}},clipEdge:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},duration:{get:function(){return r},set:function(a){r=a,v.reset(r),e.duration(r)}},isArea:{get:function(){return o},set:function(a){o=d3.functor(a)}},x:{get:function(){return l},set:function(a){l=a,e.x(a)}},y:{get:function(){return m},set:function(a){m=a,e.y(a)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.lineChart=function(){"use strict";function b(j){return C.reset(),C.models(e),s&&C.models(f),t&&C.models(g),j.each(function(j){function z(){s&&M.select(".nv-focus .nv-x.nv-axis").transition().duration(B).call(f)}function C(){t&&M.select(".nv-focus .nv-y.nv-axis").transition().duration(B).call(g)}function F(a){var b=M.select(".nv-focus .nv-linesWrap").datum(j.filter(function(a){return!a.disabled}).map(function(b,c){return{key:b.key,area:b.area,classed:b.classed,values:b.values.filter(function(b,c){return e.x()(b,c)>=a[0]&&e.x()(b,c)<=a[1]}),disableTooltip:b.disableTooltip}}));b.transition().duration(B).call(e),z(),C()}var G=d3.select(this);a.utils.initSVG(G);var H=a.utils.availableWidth(o,G,l),I=a.utils.availableHeight(p,G,l)-(w?k.height():0);if(b.update=function(){0===B?G.call(b):G.transition().duration(B).call(b)},b.container=this,x.setter(E(j),b.update).getter(D(j)).update(),x.disabled=j.map(function(a){return!!a.disabled}),!y){var J;y={};for(J in x)x[J]instanceof Array?y[J]=x[J].slice(0):y[J]=x[J]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,G),b;G.selectAll(".nv-noData").remove(),k.dispatch.on("onBrush",function(a){F(a)}),c=e.xScale(),d=e.yScale();var K=G.selectAll("g.nv-wrap.nv-lineChart").data([j]),L=K.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),M=K.select("g");L.append("g").attr("class","nv-legendWrap");var N=L.append("g").attr("class","nv-focus");N.append("g").attr("class","nv-background").append("rect"),N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-linesWrap"),N.append("g").attr("class","nv-interactive");L.append("g").attr("class","nv-focusWrap");q?(h.width(H),M.select(".nv-legendWrap").datum(j).call(h),"bottom"===r?(l.bottom=f.height()+h.height(),I=a.utils.availableHeight(p,G,l),M.select(".nv-legendWrap").attr("transform","translate(0,"+(I+f.height())+")")):"top"===r&&(m||h.height()===l.top||(l.top=h.height(),I=a.utils.availableHeight(p,G,l)-(w?k.height():0)),K.select(".nv-legendWrap").attr("transform","translate(0,"+-l.top+")"))):M.select(".nv-legendWrap").selectAll("*").remove(),K.attr("transform","translate("+l.left+","+l.top+")"),u&&M.select(".nv-y.nv-axis").attr("transform","translate("+H+",0)"),v&&(i.width(H).height(I).margin({left:l.left,top:l.top}).svgContainer(G).xScale(c),K.select(".nv-interactive").call(i)),M.select(".nv-focus .nv-background rect").attr("width",H).attr("height",I),e.width(H).height(I).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var O=M.select(".nv-linesWrap").datum(j.filter(function(a){return!a.disabled}));if(s&&f.scale(c)._ticks(a.utils.calcTicksX(H/100,j)).tickSize(-I,0),t&&g.scale(d)._ticks(a.utils.calcTicksY(I/36,j)).tickSize(-H,0),M.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+I+")"),w||null!==k.brush.extent()){k.width(H),M.select(".nv-focusWrap").style("display",w?"initial":"none").attr("transform","translate(0,"+(I+l.bottom+k.margin().top)+")").call(k);var P=k.brush.empty()?k.xDomain():k.brush.extent();null!==P&&F(P)}else O.call(e),z(),C();h.dispatch.on("stateChange",function(a){for(var c in a)x[c]=a[c];A.stateChange(x),b.update()}),i.dispatch.on("elementMousemove",function(d){e.clearHighlights();var f,h,l,m=[];if(j.filter(function(a,b){return a.seriesIndex=b,!a.disabled&&!a.disableTooltip}).forEach(function(g,i){var j=null!==k.brush.extent()?k.brush.empty()?k.xScale().domain():k.brush.extent():c.domain(),o=g.values.filter(function(a,b){return j[0]<=j[1]?e.x()(a,b)>=j[0]&&e.x()(a,b)<=j[1]:e.x()(a,b)>=j[1]&&e.x()(a,b)<=j[0]});h=a.interactiveBisect(o,d.pointXValue,e.x());var p=o[h],q=b.y()(p,h);null!==q&&e.highlightPoint(i,h,!0),void 0!==p&&(void 0===f&&(f=p),void 0===l&&(l=b.xScale()(b.x()(p,h))),m.push({key:g.key,value:q,color:n(g,g.seriesIndex),data:p}))}),m.length>2){var o=b.yScale().invert(d.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(m.map(function(a){return a.value}),o,q);null!==r&&(m[r].highlight=!0)}var s=function(a,b){return null==a?"N/A":g.tickFormat()(a)};i.tooltip.valueFormatter(i.tooltip.valueFormatter()||s).data({value:b.x()(f,h),index:h,series:m})(),i.renderGuideLine(l)}),i.dispatch.on("elementClick",function(c){var d,f=[];j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(e){var g=a.interactiveBisect(e.values,c.pointXValue,b.x()),h=e.values[g];if("undefined"!=typeof h){"undefined"==typeof d&&(d=b.xScale()(b.x()(h,g)));var i=b.yScale()(b.y()(h,g));f.push({point:h,pointIndex:g,pos:[d,i],seriesIndex:e.seriesIndex,series:e})}}),e.dispatch.elementClick(f)}),i.dispatch.on("elementMouseout",function(a){e.clearHighlights()}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&j.length===a.disabled.length&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),x.disabled=a.disabled),b.update()})}),C.renderEnd("lineChart immediate"),b}var c,d,e=a.models.line(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.interactiveGuideline(),j=a.models.tooltip(),k=a.models.focus(a.models.line()),l={top:30,right:20,bottom:50,left:60},m=null,n=a.utils.defaultColor(),o=null,p=null,q=!0,r="top",s=!0,t=!0,u=!1,v=!1,w=!1,x=a.utils.state(),y=null,z=null,A=d3.dispatch("stateChange","changeState","renderEnd"),B=250;f.orient("bottom").tickPadding(7),g.orient(u?"right":"left"),e.clipEdge(!0).duration(0),j.valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.tooltip.valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)});var C=a.utils.renderWatch(A,B),D=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},E=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on("elementMouseover.tooltip",function(a){a.series.disableTooltip||j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){j.hidden(!0)}),b.dispatch=A,b.lines=e,b.legend=h,b.focus=k,b.xAxis=f,b.x2Axis=k.xAxis,b.yAxis=g,b.y2Axis=k.yAxis,b.interactiveLayer=i,b.tooltip=j,b.state=x,b.dispatch=A,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},showLegend:{get:function(){return q},set:function(a){q=a}},legendPosition:{get:function(){return r},set:function(a){r=a}},showXAxis:{get:function(){return s},set:function(a){s=a}},showYAxis:{get:function(){return t},set:function(a){t=a}},defaultState:{get:function(){return y},set:function(a){y=a}},noData:{get:function(){return z},set:function(a){z=a}},focusEnable:{get:function(){return w},set:function(a){w=a}},focusHeight:{get:function(){return k.height()},set:function(a){k.height(a)}},focusShowAxisX:{get:function(){return k.showXAxis()},set:function(a){k.showXAxis(a)}},focusShowAxisY:{get:function(){return k.showYAxis()},set:function(a){k.showYAxis(a)}},brushExtent:{get:function(){return k.brushExtent()},set:function(a){k.brushExtent(a)}},focusMargin:{get:function(){return k.margin},set:function(a){void 0!==a.top&&(l.top=a.top,m=a.top),k.margin.right=void 0!==a.right?a.right:k.margin.right,k.margin.bottom=void 0!==a.bottom?a.bottom:k.margin.bottom,k.margin.left=void 0!==a.left?a.left:k.margin.left}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},duration:{get:function(){return B},set:function(a){B=a,C.reset(B),e.duration(B),k.duration(B),f.duration(B),g.duration(B)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n),e.color(n),k.color(n)}},interpolate:{get:function(){return e.interpolate()},set:function(a){e.interpolate(a),k.interpolate(a)}},xTickFormat:{get:function(){return f.tickFormat()},set:function(a){f.tickFormat(a),k.xTickFormat(a)}},yTickFormat:{get:function(){return g.tickFormat()},set:function(a){g.tickFormat(a),k.yTickFormat(a)}},x:{get:function(){return e.x()},set:function(a){e.x(a),k.x(a)}},y:{get:function(){return e.y()},set:function(a){e.y(a),k.y(a)}},rightAlignYAxis:{get:function(){return u},set:function(a){u=a,g.orient(u?"right":"left")}},useInteractiveGuideline:{get:function(){return v},set:function(a){v=a,v&&(e.interactive(!1),e.useVoronoi(!1))}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.lineWithFocusChart=function(){return a.models.lineChart().margin({bottom:30}).focusEnable(!0)},a.models.linePlusBarChart=function(){"use strict";function b(v){return v.each(function(v){function K(a){var b=+("e"==a),c=b?1:-1,d=$/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function S(){u.empty()||u.extent(J),na.data([u.empty()?e.domain():J]).each(function(a,b){var c=e(a[0])-e.range()[0],d=e.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>c?0:c),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>d?0:d)})}function T(){J=u.empty()?null:u.extent(),c=u.empty()?e.domain():u.extent(),L.brush({extent:c,brush:u}),S(),l.width(Y).height(Z).color(v.map(function(a,b){return a.color||D(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),j.width(Y).height(Z).color(v.map(function(a,b){return a.color||D(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var b=ga.select(".nv-focus .nv-barsWrap").datum(aa.length?aa.map(function(a,b){return{key:a.key,values:a.values.filter(function(a,b){return l.x()(a,b)>=c[0]&&l.x()(a,b)<=c[1]})}}):[{values:[]}]),h=ga.select(".nv-focus .nv-linesWrap").datum(W(ba)?[{values:[]}]:ba.filter(function(a){return!a.disabled}).map(function(a,b){return{area:a.area,fillOpacity:a.fillOpacity,strokeWidth:a.strokeWidth,key:a.key,values:a.values.filter(function(a,b){return j.x()(a,b)>=c[0]&&j.x()(a,b)<=c[1]})}}));d=aa.length&&!R?l.xScale():j.xScale(),n.scale(d)._ticks(a.utils.calcTicksX(Y/100,v)).tickSize(-Z,0),n.domain([Math.ceil(c[0]),Math.floor(c[1])]),ga.select(".nv-x.nv-axis").transition().duration(M).call(n),b.transition().duration(M).call(l),h.transition().duration(M).call(j),ga.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),p.scale(f)._ticks(a.utils.calcTicksY(Z/36,v)).tickSize(-Y,0),q.scale(g)._ticks(a.utils.calcTicksY(Z/36,v)),R?q.tickSize(ba.length?0:-Y,0):q.tickSize(aa.length?0:-Y,0);var i=aa.length?1:0,k=ba.length&&!W(ba)?1:0,m=R?k:i,o=R?i:k;ga.select(".nv-focus .nv-y1.nv-axis").style("opacity",m),ga.select(".nv-focus .nv-y2.nv-axis").style("opacity",o).attr("transform","translate("+d.range()[1]+",0)"),ga.select(".nv-focus .nv-y1.nv-axis").transition().duration(M).call(p),ga.select(".nv-focus .nv-y2.nv-axis").transition().duration(M).call(q)}var X=d3.select(this);a.utils.initSVG(X);var Y=a.utils.availableWidth(z,X,w),Z=a.utils.availableHeight(A,X,w)-(F?I:0),$=I-y.top-y.bottom;if(b.update=function(){X.transition().duration(M).call(b)},b.container=this,N.setter(V(v),b.update).getter(U(v)).update(),N.disabled=v.map(function(a){return!!a.disabled}),!O){var _;O={};for(_ in N)N[_]instanceof Array?O[_]=N[_].slice(0):O[_]=N[_]}if(!(v&&v.length&&v.filter(function(a){return a.values.length}).length))return a.utils.noData(b,X),b;X.selectAll(".nv-noData").remove();var aa=v.filter(function(a){return!a.disabled&&a.bar}),ba=v.filter(function(a){return!a.bar});d=aa.length&&!R?l.xScale():j.xScale(),e=o.scale(),f=R?j.yScale():l.yScale(),g=R?l.yScale():j.yScale(),h=R?k.yScale():m.yScale(),i=R?m.yScale():k.yScale();var ca=v.filter(function(a){return!a.disabled&&(R?!a.bar:a.bar)}).map(function(a){return a.values.map(function(a,b){return{x:B(a,b),y:C(a,b)}})}),da=v.filter(function(a){return!a.disabled&&(R?a.bar:!a.bar)}).map(function(a){return a.values.map(function(a,b){return{x:B(a,b),y:C(a,b)}})});d.range([0,Y]),e.domain(d3.extent(d3.merge(ca.concat(da)),function(a){return a.x})).range([0,Y]);var ea=X.selectAll("g.nv-wrap.nv-linePlusBar").data([v]),fa=ea.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),ga=ea.select("g");fa.append("g").attr("class","nv-legendWrap");var ha=fa.append("g").attr("class","nv-focus");ha.append("g").attr("class","nv-x nv-axis"),ha.append("g").attr("class","nv-y1 nv-axis"),ha.append("g").attr("class","nv-y2 nv-axis"),ha.append("g").attr("class","nv-barsWrap"),ha.append("g").attr("class","nv-linesWrap");var ia=fa.append("g").attr("class","nv-context");if(ia.append("g").attr("class","nv-x nv-axis"),ia.append("g").attr("class","nv-y1 nv-axis"),ia.append("g").attr("class","nv-y2 nv-axis"),ia.append("g").attr("class","nv-barsWrap"),ia.append("g").attr("class","nv-linesWrap"),ia.append("g").attr("class","nv-brushBackground"),ia.append("g").attr("class","nv-x nv-brush"),E){var ja=t.align()?Y/2:Y,ka=t.align()?ja:0;t.width(ja),ga.select(".nv-legendWrap").datum(v.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,R?a.key=a.originalKey+(a.bar?Q:P):a.key=a.originalKey+(a.bar?P:Q),a})).call(t),x||t.height()===w.top||(w.top=t.height(),Z=a.utils.availableHeight(A,X,w)-I),ga.select(".nv-legendWrap").attr("transform","translate("+ka+","+-w.top+")")}else ga.select(".nv-legendWrap").selectAll("*").remove();ea.attr("transform","translate("+w.left+","+w.top+")"),ga.select(".nv-context").style("display",F?"initial":"none"),m.width(Y).height($).color(v.map(function(a,b){return a.color||D(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),k.width(Y).height($).color(v.map(function(a,b){return a.color||D(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var la=ga.select(".nv-context .nv-barsWrap").datum(aa.length?aa:[{values:[]}]),ma=ga.select(".nv-context .nv-linesWrap").datum(W(ba)?[{values:[]}]:ba.filter(function(a){return!a.disabled}));ga.select(".nv-context").attr("transform","translate(0,"+(Z+w.bottom+y.top)+")"),la.transition().call(m),ma.transition().call(k),H&&(o._ticks(a.utils.calcTicksX(Y/100,v)).tickSize(-$,0),ga.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+h.range()[0]+")"),ga.select(".nv-context .nv-x.nv-axis").transition().call(o)),G&&(r.scale(h)._ticks($/36).tickSize(-Y,0),s.scale(i)._ticks($/36).tickSize(aa.length?0:-Y,0),ga.select(".nv-context .nv-y3.nv-axis").style("opacity",aa.length?1:0).attr("transform","translate(0,"+e.range()[0]+")"),ga.select(".nv-context .nv-y2.nv-axis").style("opacity",ba.length?1:0).attr("transform","translate("+e.range()[1]+",0)"),ga.select(".nv-context .nv-y1.nv-axis").transition().call(r),ga.select(".nv-context .nv-y2.nv-axis").transition().call(s)),u.x(e).on("brush",T),J&&u.extent(J);var na=ga.select(".nv-brushBackground").selectAll("g").data([J||u.extent()]),oa=na.enter().append("g");oa.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",$),oa.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",$);var pa=ga.select(".nv-x.nv-brush").call(u);pa.selectAll("rect").attr("height",$),pa.selectAll(".resize").append("path").attr("d",K),t.dispatch.on("stateChange",function(a){for(var c in a)N[c]=a[c];L.stateChange(N),b.update()}),L.on("changeState",function(a){"undefined"!=typeof a.disabled&&(v.forEach(function(b,c){b.disabled=a.disabled[c]}),N.disabled=a.disabled),b.update()}),T()}),b}var c,d,e,f,g,h,i,j=a.models.line(),k=a.models.line(),l=a.models.historicalBar(),m=a.models.historicalBar(),n=a.models.axis(),o=a.models.axis(),p=a.models.axis(),q=a.models.axis(),r=a.models.axis(),s=a.models.axis(),t=a.models.legend(),u=d3.svg.brush(),v=a.models.tooltip(),w={top:30,right:30,bottom:30,left:60},x=null,y={top:0,right:30,bottom:20,left:60},z=null,A=null,B=function(a){return a.x},C=function(a){return a.y},D=a.utils.defaultColor(),E=!0,F=!0,G=!1,H=!0,I=50,J=null,K=null,L=d3.dispatch("brush","stateChange","changeState"),M=0,N=a.utils.state(),O=null,P=" (left axis)",Q=" (right axis)",R=!1;j.clipEdge(!0),k.interactive(!1),k.pointActive(function(a){return!1}),n.orient("bottom").tickPadding(5),p.orient("left"),q.orient("right"),o.orient("bottom").tickPadding(5),r.orient("left"),s.orient("right"),v.headerEnabled(!0).headerFormatter(function(a,b){return n.tickFormat()(a,b)});var S=function(){return R?{main:q,focus:s}:{main:p,focus:r}},T=function(){return R?{main:p,focus:r}:{main:q,focus:s}},U=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},V=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},W=function(a){return a.every(function(a){return a.disabled})};return j.dispatch.on("elementMouseover.tooltip",function(a){v.duration(100).valueFormatter(function(a,b){return T().main.tickFormat()(a,b)}).data(a).hidden(!1)}),j.dispatch.on("elementMouseout.tooltip",function(a){v.hidden(!0)}),l.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={value:b.y()(a.data),color:a.color},v.duration(0).valueFormatter(function(a,b){return S().main.tickFormat()(a,b)}).data(a).hidden(!1)}),l.dispatch.on("elementMouseout.tooltip",function(a){v.hidden(!0)}),l.dispatch.on("elementMousemove.tooltip",function(a){v()}),b.dispatch=L,b.legend=t,b.lines=j,b.lines2=k,b.bars=l,b.bars2=m,b.xAxis=n,b.x2Axis=o,b.y1Axis=p,b.y2Axis=q,b.y3Axis=r,b.y4Axis=s,b.tooltip=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return z},set:function(a){z=a}},height:{get:function(){return A},set:function(a){A=a}},showLegend:{get:function(){return E},set:function(a){E=a}},brushExtent:{get:function(){return J},set:function(a){J=a}},noData:{get:function(){return K},set:function(a){K=a}},focusEnable:{get:function(){return F},set:function(a){F=a}},focusHeight:{get:function(){return I},set:function(a){I=a}},focusShowAxisX:{get:function(){return H},set:function(a){H=a}},focusShowAxisY:{get:function(){return G},set:function(a){G=a}},legendLeftAxisHint:{get:function(){return P},set:function(a){P=a}},legendRightAxisHint:{get:function(){return Q},set:function(a){Q=a}},margin:{get:function(){return w},set:function(a){void 0!==a.top&&(w.top=a.top,x=a.top),w.right=void 0!==a.right?a.right:w.right,w.bottom=void 0!==a.bottom?a.bottom:w.bottom,w.left=void 0!==a.left?a.left:w.left}},focusMargin:{get:function(){return y},set:function(a){y.top=void 0!==a.top?a.top:y.top,y.right=void 0!==a.right?a.right:y.right,y.bottom=void 0!==a.bottom?a.bottom:y.bottom,y.left=void 0!==a.left?a.left:y.left}},duration:{get:function(){return M},set:function(a){M=a}},color:{get:function(){return D},set:function(b){D=a.utils.getColor(b),t.color(D)}},x:{get:function(){return B},set:function(a){B=a,j.x(a),k.x(a),l.x(a),m.x(a)}},y:{get:function(){return C},set:function(a){C=a,j.y(a),k.y(a),l.y(a),m.y(a)}},switchYAxisOrder:{get:function(){return R},set:function(a){if(R!==a){var b=p;p=q,q=b;var c=r;r=s,s=c}R=a,p.orient("left"),q.orient("right"),r.orient("left"),s.orient("right")}}}),a.utils.inheritOptions(b,j),a.utils.initOptions(b),b},a.models.multiBar=function(){"use strict";function b(F){return D.reset(),F.each(function(b){var F=k-j.left-j.right,G=l-j.top-j.bottom;p=d3.select(this),a.utils.initSVG(p);var H=0;if(x&&b.length&&(x=[{values:b[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),u){var I=d3.layout.stack().offset(v).values(function(a){return a.values}).y(r)(!b.length&&x?x:b);I.forEach(function(a,c){a.nonStackable?(b[c].nonStackableSeries=H++,I[c]=b[c]):c>0&&I[c-1].nonStackable&&I[c].values.map(function(a,b){a.y0-=I[c-1].values[b].y,a.y1=a.y0+a.y})}),b=I}b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),u&&b.length>0&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a,f){if(!b[f].nonStackable){var g=a.values[c];g.size=Math.abs(g.y),g.y<0?(g.y1=e,e-=g.size):(g.y1=g.size+d,d+=g.size)}})});var J=d&&e?[]:b.map(function(a,b){return a.values.map(function(a,c){return{x:q(a,c),y:r(a,c),y0:a.y0,y1:a.y1,idx:b}})});m.domain(d||d3.merge(J).map(function(a){return a.x})).rangeBands(f||[0,F],A),n.domain(e||d3.extent(d3.merge(J).map(function(a){var c=a.y;return u&&!b[a.idx].nonStackable&&(c=a.y>0?a.y1:a.y1+a.y),c}).concat(s))).range(g||[G,0]),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]):m.domain([-1,1])),n.domain()[0]===n.domain()[1]&&(n.domain()[0]?n.domain([n.domain()[0]+.01*n.domain()[0],n.domain()[1]-.01*n.domain()[1]]):n.domain([-1,1])),h=h||m,i=i||n;var K=p.selectAll("g.nv-wrap.nv-multibar").data([b]),L=K.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),M=L.append("defs"),N=L.append("g"),O=K.select("g");N.append("g").attr("class","nv-groups"),K.attr("transform","translate("+j.left+","+j.top+")"),M.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect"), +K.select("#nv-edge-clip-"+o+" rect").attr("width",F).attr("height",G),O.attr("clip-path",t?"url(#nv-edge-clip-"+o+")":"");var P=K.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});P.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var Q=D.transition(P.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,z)).attr("y",function(a,c,d){var e=i(0)||0;return u&&b[a.series]&&!b[a.series].nonStackable&&(e=i(a.y0)),e}).attr("height",0).remove();Q.delay&&Q.delay(function(a,b){var c=b*(z/(E+1))-b;return c}),P.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return w(a,b)}).style("stroke",function(a,b){return w(a,b)}),P.style("stroke-opacity",1).style("fill-opacity",B);var R=P.selectAll("rect.nv-bar").data(function(a){return x&&!b.length?x.values:a.values});R.exit().remove();R.enter().append("rect").attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(a,c,d){return u&&!b[d].nonStackable?0:d*m.rangeBand()/b.length}).attr("y",function(a,c,d){return i(u&&!b[d].nonStackable?a.y0:0)||0}).attr("height",0).attr("width",function(a,c,d){return m.rangeBand()/(u&&!b[d].nonStackable?1:b.length)}).attr("transform",function(a,b){return"translate("+m(q(a,b))+",0)"});R.style("fill",function(a,b,c){return w(a,c,b)}).style("stroke",function(a,b,c){return w(a,c,b)}).on("mouseover",function(a,c,d){d3.select(this).classed("hover",!0),C.elementMouseover({data:a,index:c,series:b[d],color:d3.select(this).style("fill")})}).on("mouseout",function(a,c,d){d3.select(this).classed("hover",!1),C.elementMouseout({data:a,index:c,series:b[d],color:d3.select(this).style("fill")})}).on("mousemove",function(a,c,d){C.elementMousemove({data:a,index:c,series:b[d],color:d3.select(this).style("fill")})}).on("click",function(a,c,d){var e=this;C.elementClick({data:a,index:c,series:b[d],color:d3.select(this).style("fill"),event:d3.event,element:e}),d3.event.stopPropagation()}).on("dblclick",function(a,c,d){C.elementDblClick({data:a,index:c,series:b[d],color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),R.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,b){return"translate("+m(q(a,b))+",0)"}),y&&(c||(c=b.map(function(){return!0})),R.style("fill",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}));var S=R.watchTransition(D,"multibar",Math.min(250,z)).delay(function(a,c){return c*z/b[0].values.length});u?S.attr("y",function(a,c,d){var e=0;return e=b[d].nonStackable?r(a,c)<0?n(0):n(0)-n(r(a,c))<-1?n(0)-1:n(r(a,c))||0:n(a.y1)}).attr("height",function(a,c,d){return b[d].nonStackable?Math.max(Math.abs(n(r(a,c))-n(0)),0)||0:Math.max(Math.abs(n(a.y+a.y0)-n(a.y0)),0)}).attr("x",function(a,c,d){var e=0;return b[d].nonStackable&&(e=a.series*m.rangeBand()/b.length,b.length!==H&&(e=b[d].nonStackableSeries*m.rangeBand()/(2*H))),e}).attr("width",function(a,c,d){if(b[d].nonStackable){var e=m.rangeBand()/H;return b.length!==H&&(e=m.rangeBand()/(2*H)),e}return m.rangeBand()}):S.attr("x",function(a,c){return a.series*m.rangeBand()/b.length}).attr("width",m.rangeBand()/b.length).attr("y",function(a,b){return r(a,b)<0?n(0):n(0)-n(r(a,b))<1?n(0)-1:n(r(a,b))||0}).attr("height",function(a,b){return Math.max(Math.abs(n(r(a,b))-n(0)),1)||0}),h=m.copy(),i=n.copy(),b[0]&&b[0].values&&(E=b[0].values.length)}),D.renderEnd("multibar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=d3.scale.ordinal(),n=d3.scale.linear(),o=Math.floor(1e4*Math.random()),p=null,q=function(a){return a.x},r=function(a){return a.y},s=[0],t=!0,u=!1,v="zero",w=a.utils.defaultColor(),x=!1,y=null,z=500,A=.1,B=.75,C=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),D=a.utils.renderWatch(C,z),E=0;return b.dispatch=C,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return s},set:function(a){s=a}},stacked:{get:function(){return u},set:function(a){u=a}},stackOffset:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return t},set:function(a){t=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return o},set:function(a){o=a}},hideable:{get:function(){return x},set:function(a){x=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},fillOpacity:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return z},set:function(a){z=a,D.reset(z)}},color:{get:function(){return w},set:function(b){w=a.utils.getColor(b)}},barColor:{get:function(){return y},set:function(b){y=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarChart=function(){"use strict";function b(D){return I.reset(),I.models(e),u&&I.models(f),v&&I.models(g),D.each(function(D){var I=d3.select(this);a.utils.initSVG(I);var M=a.utils.availableWidth(n,I,l),N=a.utils.availableHeight(o,I,l);if(b.update=function(){0===G?I.call(b):I.transition().duration(G).call(b)},b.container=this,B.setter(L(D),b.update).getter(K(D)).update(),B.disabled=D.map(function(a){return!!a.disabled}),!C){var O;C={};for(O in B)B[O]instanceof Array?C[O]=B[O].slice(0):C[O]=B[O]}if(!(D&&D.length&&D.filter(function(a){return a.values.length}).length))return a.utils.noData(b,I),b;I.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var P=I.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([D]),Q=P.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),R=P.select("g");if(Q.append("g").attr("class","nv-x nv-axis"),Q.append("g").attr("class","nv-y nv-axis"),Q.append("g").attr("class","nv-barsWrap"),Q.append("g").attr("class","nv-legendWrap"),Q.append("g").attr("class","nv-controlsWrap"),Q.append("g").attr("class","nv-interactive"),s?"bottom"===t?(i.width(M-l.right),R.select(".nv-legendWrap").datum(D).call(i),l.bottom=f.height()+i.height(),N=a.utils.availableHeight(o,I,l),R.select(".nv-legendWrap").attr("transform","translate(0,"+(N+f.height())+")")):(i.width(M-F()),R.select(".nv-legendWrap").datum(D).call(i),m||i.height()===l.top||(l.top=i.height(),N=a.utils.availableHeight(o,I,l)),R.select(".nv-legendWrap").attr("transform","translate("+F()+","+-l.top+")")):R.select(".nv-legendWrap").selectAll("*").remove(),q){var S=[{key:r.grouped||"Grouped",disabled:e.stacked()},{key:r.stacked||"Stacked",disabled:!e.stacked()}];j.width(F()).color(["#444","#444","#444"]),R.select(".nv-controlsWrap").datum(S).attr("transform","translate(0,"+-l.top+")").call(j)}else R.select(".nv-controlsWrap").selectAll("*").remove();P.attr("transform","translate("+l.left+","+l.top+")"),w&&R.select(".nv-y.nv-axis").attr("transform","translate("+M+",0)"),e.disabled(D.map(function(a){return a.disabled})).width(M).height(N).color(D.map(function(a,b){return a.color||p(a,b)}).filter(function(a,b){return!D[b].disabled}));var T=R.select(".nv-barsWrap").datum(D.filter(function(a){return!a.disabled}));if(T.call(e),u){f.scale(c)._ticks(a.utils.calcTicksX(M/100,D)).tickSize(-N,0),R.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),R.select(".nv-x.nv-axis").call(f);var U=R.select(".nv-x.nv-axis > g").selectAll("g");if(U.selectAll("line, text").style("opacity",1),y){var V=function(a,b){return"translate("+a+","+b+")"},W=5,X=17;U.selectAll("text").attr("transform",function(a,b,c){return V(0,c%2==0?W:X)});var Y=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;R.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(a,b){return V(0,0===b||Y%2!==0?X:W)})}z&&R.selectAll(".tick text").call(a.utils.wrapTicks,b.xAxis.rangeBand()),x&&U.filter(function(a,b){return b%Math.ceil(D[0].values.length/(M/100))!==0}).selectAll("text, line").style("opacity",0),A&&U.selectAll(".tick text").attr("transform","rotate("+A+" 0,0)").style("text-anchor",A>0?"start":"end"),R.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}v&&(g.scale(d)._ticks(a.utils.calcTicksY(N/36,D)).tickSize(-M,0),R.select(".nv-y.nv-axis").call(g)),H&&(h.width(M).height(N).margin({left:l.left,top:l.top}).svgContainer(I).xScale(c),P.select(".nv-interactive").call(h)),i.dispatch.on("stateChange",function(a){for(var c in a)B[c]=a[c];E.stateChange(B),b.update()}),j.dispatch.on("legendClick",function(a,c){if(a.disabled){switch(S=S.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":case r.grouped:e.stacked(!1);break;case"Stacked":case r.stacked:e.stacked(!0)}B.stacked=e.stacked(),E.stateChange(B),b.update()}}),E.on("changeState",function(a){"undefined"!=typeof a.disabled&&(D.forEach(function(b,c){b.disabled=a.disabled[c]}),B.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),B.stacked=a.stacked,J=a.stacked),b.update()}),H?(h.dispatch.on("elementMousemove",function(a){if(void 0!=a.pointXValue){var d,e,f,g,i=[];D.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(h,j){e=c.domain().indexOf(a.pointXValue);var k=h.values[e];void 0!==k&&(g=k.x,void 0===d&&(d=k),void 0===f&&(f=a.mouseX),i.push({key:h.key,value:b.y()(k,e),color:p(h,h.seriesIndex),data:h.values[e]}))}),h.tooltip.data({value:g,index:e,series:i})(),h.renderGuideLine(f)}}),h.dispatch.on("elementMouseout",function(a){h.tooltip.hidden(!0)})):(e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},k.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){k.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(a){k()}))}),I.renderEnd("multibarchart immediate"),b}var c,d,e=a.models.multiBar(),f=a.models.axis(),g=a.models.axis(),h=a.interactiveGuideline(),i=a.models.legend(),j=a.models.legend(),k=a.models.tooltip(),l={top:30,right:20,bottom:50,left:60},m=null,n=null,o=null,p=a.utils.defaultColor(),q=!0,r={},s=!0,t=null,u=!0,v=!0,w=!1,x=!0,y=!1,z=!1,A=0,B=a.utils.state(),C=null,D=null,E=d3.dispatch("stateChange","changeState","renderEnd"),F=function(){return q?180:0},G=250,H=!1;B.stacked=!1,e.stacked(!1),f.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat(function(a){return a}),g.orient(w?"right":"left").tickFormat(d3.format(",.1f")),k.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),h.tooltip.valueFormatter(function(a,b){return null==a?"N/A":g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),h.tooltip.valueFormatter(function(a,b){return null==a?"N/A":g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),h.tooltip.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),j.updateState(!1);var I=a.utils.renderWatch(E),J=!1,K=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:J}}},L=function(a){return function(b){void 0!==b.stacked&&(J=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return b.dispatch=E,b.multibar=e,b.legend=i,b.controls=j,b.xAxis=f,b.yAxis=g,b.state=B,b.tooltip=k,b.interactiveLayer=h,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return n},set:function(a){n=a}},height:{get:function(){return o},set:function(a){o=a}},showLegend:{get:function(){return s},set:function(a){s=a}},legendPosition:{get:function(){return t},set:function(a){t=a}},showControls:{get:function(){return q},set:function(a){q=a}},controlLabels:{get:function(){return r},set:function(a){r=a}},showXAxis:{get:function(){return u},set:function(a){u=a}},showYAxis:{get:function(){return v},set:function(a){v=a}},defaultState:{get:function(){return C},set:function(a){C=a}},noData:{get:function(){return D},set:function(a){D=a}},reduceXTicks:{get:function(){return x},set:function(a){x=a}},rotateLabels:{get:function(){return A},set:function(a){A=a}},staggerLabels:{get:function(){return y},set:function(a){y=a}},wrapLabels:{get:function(){return z},set:function(a){z=!!a}},margin:{get:function(){return l},set:function(a){void 0!==a.top&&(l.top=a.top,m=a.top),l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},duration:{get:function(){return G},set:function(a){G=a,e.duration(G),f.duration(G),g.duration(G),I.reset(G)}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b),i.color(p)}},rightAlignYAxis:{get:function(){return w},set:function(a){w=a,g.orient(w?"right":"left")}},useInteractiveGuideline:{get:function(){return H},set:function(a){H=a}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),i.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiBarHorizontal=function(){"use strict";function b(m){return F.reset(),m.each(function(b){var m=k-j.left-j.right,D=l-j.top-j.bottom;n=d3.select(this),a.utils.initSVG(n),w&&(b=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(r)(b)),b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),w&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var G=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:q(a,b),y:r(a,b),y0:a.y0,y1:a.y1}})});o.domain(d||d3.merge(G).map(function(a){return a.x})).rangeBands(f||[0,D],A),p.domain(e||d3.extent(d3.merge(G).map(function(a){return w?a.y>0?a.y1+a.y:a.y1:a.y}).concat(t))),x&&!w?p.range(g||[p.domain()[0]<0?z:0,m-(p.domain()[1]>0?z:0)]):p.range(g||[0,m]),h=h||o,i=i||d3.scale.linear().domain(p.domain()).range([p(0),p(0)]);var H=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([b]),I=H.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),J=(I.append("defs"),I.append("g"));H.select("g");J.append("g").attr("class","nv-groups"),H.attr("transform","translate("+j.left+","+j.top+")");var K=H.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});K.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),K.exit().watchTransition(F,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),K.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return u(a,b)}).style("stroke",function(a,b){return u(a,b)}),K.watchTransition(F,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",B);var L=K.selectAll("g.nv-bar").data(function(a){return a.values});L.exit().remove();var M=L.enter().append("g").attr("transform",function(a,c,d){return"translate("+i(w?a.y0:0)+","+(w?0:d*o.rangeBand()/b.length+o(q(a,c)))+")"});M.append("rect").attr("width",0).attr("height",o.rangeBand()/(w?1:b.length)),L.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),E.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),E.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){E.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){E.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){var c=this;E.elementClick({data:a,index:b,color:d3.select(this).style("fill"),event:d3.event,element:c}),d3.event.stopPropagation()}).on("dblclick",function(a,b){E.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),s(b[0],0)&&(M.append("polyline"),L.select("polyline").attr("fill","none").attr("points",function(a,c){var d=s(a,c),e=.8*o.rangeBand()/(2*(w?1:b.length));d=d.length?d:[-Math.abs(d),Math.abs(d)],d=d.map(function(b){return p(b+(r(a,c)<0?0:r(a,c)))-p(0)});var f=[[d[0],-e],[d[0],e],[d[0],0],[d[1],0],[d[1],-e],[d[1],e]];return f.map(function(a){return a.join(",")}).join(" ")}).attr("transform",function(a,c){var d=o.rangeBand()/(2*(w?1:b.length));return"translate(0, "+d+")"})),M.append("text"),x&&!w?(L.select("text").attr("text-anchor",function(a,b){return r(a,b)<0?"end":"start"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){var c=C(r(a,b)),d=s(a,b);return void 0===d?c:d.length?c+"+"+C(Math.abs(d[1]))+"-"+C(Math.abs(d[0])):c+"±"+C(Math.abs(d))}),L.watchTransition(F,"multibarhorizontal: bars").select("text").attr("x",function(a,b){return r(a,b)<0?-4:p(r(a,b))-p(0)+4})):L.selectAll("text").text(""),y&&!w?(M.append("text").classed("nv-bar-label",!0),L.select("text.nv-bar-label").attr("text-anchor",function(a,b){return r(a,b)<0?"start":"end"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){return q(a,b)}),L.watchTransition(F,"multibarhorizontal: bars").select("text.nv-bar-label").attr("x",function(a,b){return r(a,b)<0?p(0)-p(r(a,b))+4:-4})):L.selectAll("text.nv-bar-label").text(""),L.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}),v&&(c||(c=b.map(function(){return!0})),L.style("fill",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()})),w?L.watchTransition(F,"multibarhorizontal: bars").attr("transform",function(a,b){return"translate("+p(a.y1)+","+o(q(a,b))+")"}).select("rect").attr("width",function(a,b){return Math.abs(p(r(a,b)+a.y0)-p(a.y0))||0}).attr("height",o.rangeBand()):L.watchTransition(F,"multibarhorizontal: bars").attr("transform",function(a,c){return"translate("+p(r(a,c)<0?r(a,c):0)+","+(a.series*o.rangeBand()/b.length+o(q(a,c)))+")"}).select("rect").attr("height",o.rangeBand()/b.length).attr("width",function(a,b){return Math.max(Math.abs(p(r(a,b))-p(0)),1)||0}),h=o.copy(),i=p.copy()}),F.renderEnd("multibarHorizontal immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=null,o=d3.scale.ordinal(),p=d3.scale.linear(),q=function(a){return a.x},r=function(a){return a.y},s=function(a){return a.yErr},t=[0],u=a.utils.defaultColor(),v=null,w=!1,x=!1,y=!1,z=60,A=.1,B=.75,C=d3.format(",.2f"),D=250,E=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),F=a.utils.renderWatch(E,D);return b.dispatch=E,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},yErr:{get:function(){return s},set:function(a){s=a}},xScale:{get:function(){return o},set:function(a){o=a}},yScale:{get:function(){return p},set:function(a){p=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return t},set:function(a){t=a}},stacked:{get:function(){return w},set:function(a){w=a}},showValues:{get:function(){return x},set:function(a){x=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return m},set:function(a){m=a}},valueFormat:{get:function(){return C},set:function(a){C=a}},valuePadding:{get:function(){return z},set:function(a){z=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},fillOpacity:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return D},set:function(a){D=a,F.reset(D)}},color:{get:function(){return u},set:function(b){u=a.utils.getColor(b)}},barColor:{get:function(){return v},set:function(b){v=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarHorizontalChart=function(){"use strict";function b(j){return F.reset(),F.models(e),u&&F.models(f),v&&F.models(g),j.each(function(j){var z=d3.select(this);a.utils.initSVG(z);var F=a.utils.availableWidth(m,z,k),G=a.utils.availableHeight(n,z,k);if(b.update=function(){z.transition().duration(C).call(b)},b.container=this,w=e.stacked(),x.setter(E(j),b.update).getter(D(j)).update(),x.disabled=j.map(function(a){return!!a.disabled}),!y){var H;y={};for(H in x)x[H]instanceof Array?y[H]=x[H].slice(0):y[H]=x[H]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,z),b;z.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var I=z.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([j]),J=I.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),K=I.select("g");if(J.append("g").attr("class","nv-x nv-axis"),J.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),J.append("g").attr("class","nv-barsWrap"),J.append("g").attr("class","nv-legendWrap"),J.append("g").attr("class","nv-controlsWrap"),s?(h.width(F-B()),K.select(".nv-legendWrap").datum(j).call(h),"bottom"===t?(k.bottom=f.height()+h.height(),G=a.utils.availableHeight(n,z,k),K.select(".nv-legendWrap").attr("transform","translate("+B()+","+(G+f.height())+")")):"top"===t&&(l||h.height()===k.top||(k.top=h.height(),G=a.utils.availableHeight(n,z,k)),K.select(".nv-legendWrap").attr("transform","translate("+B()+","+-k.top+")"))):K.select(".nv-legendWrap").selectAll("*").remove(),p){var L=[{key:r.grouped||"Grouped",disabled:e.stacked()},{key:r.stacked||"Stacked",disabled:!e.stacked()}];i.width(B()).color(["#444","#444","#444"]),"bottom"===q?(k.bottom=f.height()+h.height(),G=a.utils.availableHeight(n,z,k),K.select(".nv-controlsWrap").datum(L).attr("transform","translate(0,"+(G+f.height())+")").call(i)):"top"===q&&K.select(".nv-controlsWrap").datum(L).attr("transform","translate(0,"+-k.top+")").call(i)}else K.select(".nv-controlsWrap").selectAll("*").remove();I.attr("transform","translate("+k.left+","+k.top+")"),e.disabled(j.map(function(a){return a.disabled})).width(F).height(G).color(j.map(function(a,b){return a.color||o(a,b)}).filter(function(a,b){return!j[b].disabled}));var M=K.select(".nv-barsWrap").datum(j.filter(function(a){return!a.disabled}));if(M.transition().call(e),u){f.scale(c)._ticks(a.utils.calcTicksY(G/24,j)).tickSize(-F,0),K.select(".nv-x.nv-axis").call(f);var N=K.select(".nv-x.nv-axis").selectAll("g");N.selectAll("line, text")}v&&(g.scale(d)._ticks(a.utils.calcTicksX(F/100,j)).tickSize(-G,0),K.select(".nv-y.nv-axis").attr("transform","translate(0,"+G+")"),K.select(".nv-y.nv-axis").call(g)),K.select(".nv-zeroLine line").attr("x1",d(0)).attr("x2",d(0)).attr("y1",0).attr("y2",-G),h.dispatch.on("stateChange",function(a){for(var c in a)x[c]=a[c];A.stateChange(x),b.update()}),i.dispatch.on("legendClick",function(a,c){if(a.disabled){switch(L=L.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":case r.grouped:e.stacked(!1);break;case"Stacked":case r.stacked:e.stacked(!0)}x.stacked=e.stacked(),A.stateChange(x),w=e.stacked(),b.update()}}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),x.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),x.stacked=a.stacked,w=a.stacked),b.update()})}),F.renderEnd("multibar horizontal chart immediate"),b}var c,d,e=a.models.multiBarHorizontal(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend().height(30),i=a.models.legend().height(30),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=null,o=a.utils.defaultColor(),p=!0,q="top",r={},s=!0,t="top",u=!0,v=!0,w=!1,x=a.utils.state(),y=null,z=null,A=d3.dispatch("stateChange","changeState","renderEnd"),B=function(){return p?180:0},C=250;x.stacked=!1,e.stacked(w),f.orient("left").tickPadding(5).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("bottom").tickFormat(d3.format(",.1f")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var D=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:w}}},E=function(a){return function(b){void 0!==b.stacked&&(w=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},F=a.utils.renderWatch(A,C);return e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){j.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(a){j()}),b.dispatch=A,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=x,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return s},set:function(a){s=a}},legendPosition:{get:function(){return t},set:function(a){t=a}},controlsPosition:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return p},set:function(a){p=a}},controlLabels:{get:function(){return r},set:function(a){r=a}},showXAxis:{get:function(){return u},set:function(a){u=a}},showYAxis:{get:function(){return v},set:function(a){v=a}},defaultState:{get:function(){return y},set:function(a){y=a}},noData:{get:function(){return z},set:function(a){z=a}},margin:{get:function(){return k},set:function(a){void 0!==a.top&&(k.top=a.top,l=a.top),k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return C},set:function(a){C=a,F.reset(C),e.duration(C),f.duration(C),g.duration(C)}},color:{get:function(){return o},set:function(b){o=a.utils.getColor(b),h.color(o)}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiChart=function(){"use strict";function b(k){return k.each(function(k){function o(a){var b=2===a.series.yAxis?G:F;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color,key:a.series.key},I.duration(0).headerFormatter(function(a,b){return E.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function s(a){var b=2===a.series.yAxis?G:F;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color,key:a.series.key},I.duration(100).headerFormatter(function(a,b){return E.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function J(a){var b=2===a.series.yAxis?G:F;a.point.x=C.x()(a.point),a.point.y=C.y()(a.point),I.duration(0).headerFormatter(function(a,b){return E.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function L(a){var b=2===a.series.yAxis?G:F;a.value=A.x()(a.data),a.series={value:A.y()(a.data),color:a.color,key:a.data.key},I.duration(0).headerFormatter(function(a,b){return E.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function M(){for(var a=0,b=K.length;b>a;a++){var c=K[a];try{c.clearHighlights()}catch(d){}}}function N(a,b,c){for(var d=0,e=K.length;e>d;d++){var f=K[d];try{f.highlightPoint(a,b,c)}catch(g){}}}var O=d3.select(this);a.utils.initSVG(O),b.update=function(){O.transition().call(b)},b.container=this;var P=a.utils.availableWidth(h,O,e),Q=a.utils.availableHeight(i,O,e),R=k.filter(function(a){return"line"==a.type&&1==a.yAxis}),S=k.filter(function(a){return"line"==a.type&&2==a.yAxis}),T=k.filter(function(a){return"scatter"==a.type&&1==a.yAxis}),U=k.filter(function(a){return"scatter"==a.type&&2==a.yAxis}),V=k.filter(function(a){return"bar"==a.type&&1==a.yAxis}),W=k.filter(function(a){return"bar"==a.type&&2==a.yAxis}),X=k.filter(function(a){return"area"==a.type&&1==a.yAxis}),Y=k.filter(function(a){return"area"==a.type&&2==a.yAxis});if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(b,O),b;O.selectAll(".nv-noData").remove();var Z=k.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a,b){return{x:l(a),y:m(a)}})}),$=k.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a,b){return{x:l(a),y:m(a)}})});t.domain(d3.extent(d3.merge(Z.concat($)),function(a){return a.x})).range([0,P]);var _=O.selectAll("g.wrap.multiChart").data([k]),aa=_.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");aa.append("g").attr("class","nv-x nv-axis"),aa.append("g").attr("class","nv-y1 nv-axis"),aa.append("g").attr("class","nv-y2 nv-axis"),aa.append("g").attr("class","stack1Wrap"),aa.append("g").attr("class","stack2Wrap"),aa.append("g").attr("class","bars1Wrap"),aa.append("g").attr("class","bars2Wrap"),aa.append("g").attr("class","scatters1Wrap"),aa.append("g").attr("class","scatters2Wrap"),aa.append("g").attr("class","lines1Wrap"),aa.append("g").attr("class","lines2Wrap"),aa.append("g").attr("class","legendWrap"),aa.append("g").attr("class","nv-interactive");var ba=_.select("g"),ca=k.map(function(a,b){return k[b].color||g(a,b)});if(j){var da=H.align()?P/2:P,ea=H.align()?da:0;H.width(da),H.color(ca),ba.select(".legendWrap").datum(k.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?"":r),a})).call(H),f||H.height()===e.top||(e.top=H.height(),Q=a.utils.availableHeight(i,O,e)),ba.select(".legendWrap").attr("transform","translate("+ea+","+-e.top+")")}else ba.select(".legendWrap").selectAll("*").remove();w.width(P).height(Q).interpolate(n).color(ca.filter(function(a,b){return!k[b].disabled&&1==k[b].yAxis&&"line"==k[b].type})),x.width(P).height(Q).interpolate(n).color(ca.filter(function(a,b){return!k[b].disabled&&2==k[b].yAxis&&"line"==k[b].type})),y.width(P).height(Q).color(ca.filter(function(a,b){return!k[b].disabled&&1==k[b].yAxis&&"scatter"==k[b].type})),z.width(P).height(Q).color(ca.filter(function(a,b){return!k[b].disabled&&2==k[b].yAxis&&"scatter"==k[b].type})),A.width(P).height(Q).color(ca.filter(function(a,b){return!k[b].disabled&&1==k[b].yAxis&&"bar"==k[b].type})),B.width(P).height(Q).color(ca.filter(function(a,b){return!k[b].disabled&&2==k[b].yAxis&&"bar"==k[b].type})),C.width(P).height(Q).interpolate(n).color(ca.filter(function(a,b){return!k[b].disabled&&1==k[b].yAxis&&"area"==k[b].type})),D.width(P).height(Q).interpolate(n).color(ca.filter(function(a,b){ +return!k[b].disabled&&2==k[b].yAxis&&"area"==k[b].type})),ba.attr("transform","translate("+e.left+","+e.top+")");var fa=ba.select(".lines1Wrap").datum(R.filter(function(a){return!a.disabled})),ga=ba.select(".scatters1Wrap").datum(T.filter(function(a){return!a.disabled})),ha=ba.select(".bars1Wrap").datum(V.filter(function(a){return!a.disabled})),ia=ba.select(".stack1Wrap").datum(X.filter(function(a){return!a.disabled})),ja=ba.select(".lines2Wrap").datum(S.filter(function(a){return!a.disabled})),ka=ba.select(".scatters2Wrap").datum(U.filter(function(a){return!a.disabled})),la=ba.select(".bars2Wrap").datum(W.filter(function(a){return!a.disabled})),ma=ba.select(".stack2Wrap").datum(Y.filter(function(a){return!a.disabled})),na=[];if(A.stacked()&&V.length){var na=V.filter(function(a){return!a.disabled}).map(function(a){return a.values});na.length>0&&(na=na.reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}))}V.length&&na.push({x:0,y:0});var oa=[];if(B.stacked()&&W.length){var oa=W.filter(function(a){return!a.disabled}).map(function(a){return a.values});oa.length>0&&(oa=oa.reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}))}W.length&&oa.push({x:0,y:0}),u.domain(c||d3.extent(d3.merge(Z).concat(na),function(a){return a.y})).range([0,Q]),v.domain(d||d3.extent(d3.merge($).concat(oa),function(a){return a.y})).range([0,Q]),w.yDomain(u.domain()),y.yDomain(u.domain()),A.yDomain(u.domain()),C.yDomain(u.domain()),x.yDomain(v.domain()),z.yDomain(v.domain()),B.yDomain(v.domain()),D.yDomain(v.domain()),X.length&&d3.transition(ia).call(C),Y.length&&d3.transition(ma).call(D),V.length&&d3.transition(ha).call(A),W.length&&d3.transition(la).call(B),R.length&&d3.transition(fa).call(w),S.length&&d3.transition(ja).call(x),T.length&&d3.transition(ga).call(y),U.length&&d3.transition(ka).call(z),E._ticks(a.utils.calcTicksX(P/100,k)).tickSize(-Q,0),ba.select(".nv-x.nv-axis").attr("transform","translate(0,"+Q+")"),d3.transition(ba.select(".nv-x.nv-axis")).call(E),F._ticks(a.utils.calcTicksY(Q/36,k)).tickSize(-P,0),d3.transition(ba.select(".nv-y1.nv-axis")).call(F),G._ticks(a.utils.calcTicksY(Q/36,k)).tickSize(-P,0),d3.transition(ba.select(".nv-y2.nv-axis")).call(G),ba.select(".nv-y1.nv-axis").classed("nv-disabled",Z.length?!1:!0).attr("transform","translate("+t.range()[0]+",0)"),ba.select(".nv-y2.nv-axis").classed("nv-disabled",$.length?!1:!0).attr("transform","translate("+t.range()[1]+",0)"),H.dispatch.on("stateChange",function(a){b.update()}),q&&(p.width(P).height(Q).margin({left:e.left,top:e.top}).svgContainer(O).xScale(t),_.select(".nv-interactive").call(p)),q?(p.dispatch.on("elementMousemove",function(c){M();var d,e,f,h=[];k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(i,j){var k=t.domain(),l=i.values.filter(function(a,c){return b.x()(a,c)>=k[0]&&b.x()(a,c)<=k[1]});e=a.interactiveBisect(l,c.pointXValue,b.x());var m=l[e],n=b.y()(m,e);null!==n&&N(j,e,!0),void 0!==m&&(void 0===d&&(d=m),void 0===f&&(f=t(b.x()(m,e))),h.push({key:i.key,value:n,color:g(i,i.seriesIndex),data:m,yAxis:2==i.yAxis?G:F}))});var i=function(a,b){var c=h[b].yAxis;return null==a?"N/A":c.tickFormat()(a)};p.tooltip.headerFormatter(function(a,b){return E.tickFormat()(a,b)}).valueFormatter(p.tooltip.valueFormatter()||i).data({value:b.x()(d,e),index:e,series:h})(),p.renderGuideLine(f)}),p.dispatch.on("elementMouseout",function(a){M()})):(w.dispatch.on("elementMouseover.tooltip",o),x.dispatch.on("elementMouseover.tooltip",o),w.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),x.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),y.dispatch.on("elementMouseover.tooltip",s),z.dispatch.on("elementMouseover.tooltip",s),y.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),z.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),C.dispatch.on("elementMouseover.tooltip",J),D.dispatch.on("elementMouseover.tooltip",J),C.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),D.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),A.dispatch.on("elementMouseover.tooltip",L),B.dispatch.on("elementMouseover.tooltip",L),A.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),B.dispatch.on("elementMouseout.tooltip",function(a){I.hidden(!0)}),A.dispatch.on("elementMousemove.tooltip",function(a){I()}),B.dispatch.on("elementMousemove.tooltip",function(a){I()}))}),b}var c,d,e={top:30,right:20,bottom:50,left:60},f=null,g=a.utils.defaultColor(),h=null,i=null,j=!0,k=null,l=function(a){return a.x},m=function(a){return a.y},n="linear",o=!0,p=a.interactiveGuideline(),q=!1,r=" (right axis)",s=250,t=d3.scale.linear(),u=d3.scale.linear(),v=d3.scale.linear(),w=a.models.line().yScale(u).duration(s),x=a.models.line().yScale(v).duration(s),y=a.models.scatter().yScale(u).duration(s),z=a.models.scatter().yScale(v).duration(s),A=a.models.multiBar().stacked(!1).yScale(u).duration(s),B=a.models.multiBar().stacked(!1).yScale(v).duration(s),C=a.models.stackedArea().yScale(u).duration(s),D=a.models.stackedArea().yScale(v).duration(s),E=a.models.axis().scale(t).orient("bottom").tickPadding(5).duration(s),F=a.models.axis().scale(u).orient("left").duration(s),G=a.models.axis().scale(v).orient("right").duration(s),H=a.models.legend().height(30),I=a.models.tooltip(),J=d3.dispatch(),K=[w,x,y,z,A,B,C,D];return b.dispatch=J,b.legend=H,b.lines1=w,b.lines2=x,b.scatters1=y,b.scatters2=z,b.bars1=A,b.bars2=B,b.stack1=C,b.stack2=D,b.xAxis=E,b.yAxis1=F,b.yAxis2=G,b.tooltip=I,b.interactiveLayer=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},showLegend:{get:function(){return j},set:function(a){j=a}},yDomain1:{get:function(){return c},set:function(a){c=a}},yDomain2:{get:function(){return d},set:function(a){d=a}},noData:{get:function(){return k},set:function(a){k=a}},interpolate:{get:function(){return n},set:function(a){n=a}},legendRightAxisHint:{get:function(){return r},set:function(a){r=a}},margin:{get:function(){return e},set:function(a){void 0!==a.top&&(e.top=a.top,f=a.top),e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return g},set:function(b){g=a.utils.getColor(b)}},x:{get:function(){return l},set:function(a){l=a,w.x(a),x.x(a),y.x(a),z.x(a),A.x(a),B.x(a),C.x(a),D.x(a)}},y:{get:function(){return m},set:function(a){m=a,w.y(a),x.y(a),y.y(a),z.y(a),C.y(a),D.y(a),A.y(a),B.y(a)}},useVoronoi:{get:function(){return o},set:function(a){o=a,w.useVoronoi(a),x.useVoronoi(a),C.useVoronoi(a),D.useVoronoi(a)}},useInteractiveGuideline:{get:function(){return q},set:function(a){q=a,q&&(w.interactive(!1),w.useVoronoi(!1),x.interactive(!1),x.useVoronoi(!1),C.interactive(!1),C.useVoronoi(!1),D.interactive(!1),D.useVoronoi(!1),y.interactive(!1),z.interactive(!1))}},duration:{get:function(){return s},set:function(a){s=a,[w,x,C,D,y,z,E,F,G].forEach(function(a){a.duration(s)})}}}),a.utils.initOptions(b),b},a.models.ohlcBar=function(){"use strict";function b(y){return y.each(function(b){k=d3.select(this);var y=a.utils.availableWidth(h,k,g),A=a.utils.availableHeight(i,k,g);a.utils.initSVG(k);var B=y/b[0].values.length*.9;l.domain(c||d3.extent(b[0].values.map(n).concat(t))),v?l.range(e||[.5*y/b[0].values.length,y*(b[0].values.length-.5)/b[0].values.length]):l.range(e||[5+B/2,y-B/2-5]),m.domain(d||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(f||[A,0]),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1]));var C=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([b[0].values]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),E=D.append("defs"),F=D.append("g"),G=C.select("g");F.append("g").attr("class","nv-ticks"),C.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:j})}),E.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),C.select("#nv-chart-clip-path-"+j+" rect").attr("width",y).attr("height",A),G.attr("clip-path",w?"url(#nv-chart-clip-path-"+j+")":"");var H=C.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});H.exit().remove(),H.enter().append("path").attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}).attr("d",function(a,b){return"m0,0l0,"+(m(p(a,b))-m(r(a,b)))+"l"+-B/2+",0l"+B/2+",0l0,"+(m(s(a,b))-m(p(a,b)))+"l0,"+(m(q(a,b))-m(s(a,b)))+"l"+B/2+",0l"+-B/2+",0z"}).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("fill",function(a,b){return x[0]}).attr("stroke",function(a,b){return x[0]}).attr("x",0).attr("y",function(a,b){return m(Math.max(0,o(a,b)))}).attr("height",function(a,b){return Math.abs(m(o(a,b))-m(0))}),H.attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(H).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("d",function(a,c){var d=y/b[0].values.length*.9;return"m0,0l0,"+(m(p(a,c))-m(r(a,c)))+"l"+-d/2+",0l"+d/2+",0l0,"+(m(s(a,c))-m(p(a,c)))+"l0,"+(m(q(a,c))-m(s(a,c)))+"l"+d/2+",0l"+-d/2+",0z"})}),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,c){b.clearHighlights(),k.select(".nv-ohlcBar .nv-tick-0-"+a).classed("hover",c)},b.clearHighlights=function(){k.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!=a.top?a.top:g.top,g.right=void 0!=a.right?a.right:g.right,g.bottom=void 0!=a.bottom?a.bottom:g.bottom,g.left=void 0!=a.left?a.left:g.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.parallelCoordinates=function(){"use strict";function b(B){return A.reset(),B.each(function(b){function A(a){return x(o.map(function(b){if(isNaN(a.values[b.key])||isNaN(parseFloat(a.values[b.key]))||O){var c=l[b.key].domain(),d=l[b.key].range(),e=c[0]-(c[1]-c[0])/9;if(v.indexOf(b.key)<0){var f=d3.scale.linear().domain([e,c[1]]).range([j-12,d[1]]);l[b.key].brush.y(f),v.push(b.key)}if(isNaN(a.values[b.key])||isNaN(parseFloat(a.values[b.key])))return[k(b.key),l[b.key](e)]}return void 0!==U&&(v.length>0||O?(U.style("display","inline"),V.style("display","inline")):(U.style("display","none"),V.style("display","none"))),[k(b.key),l[b.key](a.values[b.key])]}))}function B(a){s.forEach(function(b){var c=l[b.dimension].brush.y().domain();b.hasOnlyNaN&&(b.extent[1]=(l[b.dimension].domain()[1]-c[0])*(b.extent[1]-b.extent[0])/(N[b.dimension]-b.extent[0])+c[0]),b.hasNaN&&(b.extent[0]=c[0]),a&&l[b.dimension].brush.extent(b.extent)}),e.select(".nv-brushBackground").each(function(a){d3.select(this).call(l[a.key].brush)}).selectAll("rect").attr("x",-8).attr("width",16),F()}function C(){q===!1&&(q=!0,B(!0))}function D(){$=p.filter(function(a){return!l[a].brush.empty()}),_=$.map(function(a){return l[a].brush.extent()}),s=[],$.forEach(function(a,b){s[b]={dimension:a,extent:_[b],hasNaN:!1,hasOnlyNaN:!1}}),t=[],c.style("display",function(a){var b=$.every(function(b,c){return(isNaN(a.values[b])||isNaN(parseFloat(a.values[b])))&&_[c][0]==l[b].brush.y().domain()[0]?!0:_[c][0]<=a.values[b]&&a.values[b]<=_[c][1]&&!isNaN(parseFloat(a.values[b]))});return b&&t.push(a),b?null:"none"}),F(),z.brush({filters:s,active:t})}function E(){var a=$.length>0?!0:!1;s.forEach(function(a){a.extent[0]===l[a.dimension].brush.y().domain()[0]&&v.indexOf(a.dimension)>=0&&(a.hasNaN=!0),a.extent[1]l[a.key].domain()[0]&&(P[a.key]=[c[0].extent[1]]),c[0].extent[0]>=l[a.key].domain()[0]&&P[a.key].push(c[0].extent[0])),d3.select(this).call(y.scale(l[a.key]).tickFormat(a.format).tickValues(P[a.key]))})}function G(a){u[a.key]=this.parentNode.__origin__=k(a.key),d.attr("visibility","hidden")}function H(a){u[a.key]=Math.min(i,Math.max(0,this.parentNode.__origin__+=d3.event.x)),c.attr("d",A),o.sort(function(a,b){return J(a.key)-J(b.key)}),o.forEach(function(a,b){return a.currentPosition=b}),k.domain(o.map(function(a){return a.key})),e.attr("transform",function(a){return"translate("+J(a.key)+")"})}function I(a,b){delete this.parentNode.__origin__,delete u[a.key],d3.select(this.parentNode).attr("transform","translate("+k(a.key)+")"),c.attr("d",A),d.attr("d",A).attr("visibility",null),z.dimensionsOrder(o)}function J(a){var b=u[a];return null==b?k(a):b}var K=d3.select(this);if(i=a.utils.availableWidth(g,K,f),j=a.utils.availableHeight(h,K,f),a.utils.initSVG(K),void 0===b[0].values){var L=[];b.forEach(function(a){var b={},c=Object.keys(a);c.forEach(function(c){"name"!==c&&(b[c]=a[c])}),L.push({key:a.name,values:b})}),b=L}var M=b.map(function(a){return a.values});0===t.length&&(t=b),p=n.sort(function(a,b){return a.currentPosition-b.currentPosition}).map(function(a){return a.key}),o=n.filter(function(a){return!a.disabled}),k.rangePoints([0,i],1).domain(o.map(function(a){return a.key}));var N={},O=!1,P=[];p.forEach(function(a){var b=d3.extent(M,function(b){return+b[a]}),c=b[0],d=b[1],e=!1;(isNaN(c)||isNaN(d))&&(e=!0,c=0,d=0),c===d&&(c-=1,d+=1);var f=s.filter(function(b){return b.dimension==a});0!==f.length&&(e?(c=l[a].domain()[0],d=l[a].domain()[1]):!f[0].hasOnlyNaN&&q?(c=c>f[0].extent[0]?f[0].extent[0]:c,d=d0||!a.utils.arrayEquals(t,aa))&&z.activeChanged(t)}),b}var c,d,e,f={top:30,right:0,bottom:10,left:0},g=null,h=null,i=null,j=null,k=d3.scale.ordinal(),l={},m="undefined values",n=[],o=[],p=[],q=!0,r=a.utils.defaultColor(),s=[],t=[],u=[],v=[],w=1,x=d3.svg.line(),y=d3.svg.axis(),z=d3.dispatch("brushstart","brush","brushEnd","dimensionsOrder","stateChange","elementClick","elementMouseover","elementMouseout","elementMousemove","renderEnd","activeChanged"),A=a.utils.renderWatch(z);return b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},dimensionData:{get:function(){return n},set:function(a){n=a}},displayBrush:{get:function(){return q},set:function(a){q=a}},filters:{get:function(){return s},set:function(a){s=a}},active:{get:function(){return t},set:function(a){t=a}},lineTension:{get:function(){return w},set:function(a){w=a}},undefinedValuesLabel:{get:function(){return m},set:function(a){m=a}},dimensions:{get:function(){return n.map(function(a){return a.key})},set:function(b){a.deprecated("dimensions","use dimensionData instead"),0===n.length?b.forEach(function(a){n.push({key:a})}):b.forEach(function(a,b){n[b].key=a})}},dimensionNames:{get:function(){return n.map(function(a){return a.key})},set:function(b){a.deprecated("dimensionNames","use dimensionData instead"),p=[],0===n.length?b.forEach(function(a){n.push({key:a})}):b.forEach(function(a,b){n[b].key=a})}},dimensionFormats:{get:function(){return n.map(function(a){return a.format})},set:function(b){a.deprecated("dimensionFormats","use dimensionData instead"),0===n.length?b.forEach(function(a){n.push({format:a})}):b.forEach(function(a,b){n[b].format=a})}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},color:{get:function(){return r},set:function(b){r=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.parallelCoordinatesChart=function(){"use strict";function b(e){return s.reset(),s.models(c),e.each(function(e){var k=d3.select(this);a.utils.initSVG(k);var p=a.utils.availableWidth(h,k,f),q=a.utils.availableHeight(i,k,f);if(b.update=function(){k.call(b)},b.container=this,l.setter(u(m),b.update).getter(t(m)).update(),l.disabled=m.map(function(a){return!!a.disabled}),m=m.map(function(a){return a.disabled=!!a.disabled,a}),m.forEach(function(a,b){a.originalPosition=isNaN(a.originalPosition)?b:a.originalPosition,a.currentPosition=isNaN(a.currentPosition)?b:a.currentPosition}),!o){var s;o={};for(s in l)l[s]instanceof Array?o[s]=l[s].slice(0):o[s]=l[s]}if(!e||!e.length)return a.utils.noData(b,k),b;k.selectAll(".nv-noData").remove();var v=k.selectAll("g.nv-wrap.nv-parallelCoordinatesChart").data([e]),w=v.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinatesChart").append("g"),x=v.select("g");w.append("g").attr("class","nv-parallelCoordinatesWrap"),w.append("g").attr("class","nv-legendWrap"),x.select("rect").attr("width",p).attr("height",q>0?q:0),j?(d.width(p).color(function(a){return"rgb(188,190,192)"}),x.select(".nv-legendWrap").datum(m.sort(function(a,b){return a.originalPosition-b.originalPosition})).call(d),g||d.height()===f.top||(f.top=d.height(),q=a.utils.availableHeight(i,k,f)),v.select(".nv-legendWrap").attr("transform","translate( 0 ,"+-f.top+")")):x.select(".nv-legendWrap").selectAll("*").remove(),v.attr("transform","translate("+f.left+","+f.top+")"),c.width(p).height(q).dimensionData(m).displayBrush(n);var y=x.select(".nv-parallelCoordinatesWrap ").datum(e);y.transition().call(c),c.dispatch.on("brushEnd",function(a,b){b?(n=!0,r.brushEnd(a)):n=!1}),d.dispatch.on("stateChange",function(a){for(var c in a)l[c]=a[c];r.stateChange(l),b.update()}),c.dispatch.on("dimensionsOrder",function(a){m.sort(function(a,b){return a.currentPosition-b.currentPosition});var b=!1;m.forEach(function(a,c){a.currentPosition=c,a.currentPosition!==a.originalPosition&&(b=!0)}),r.dimensionsOrder(m,b)}),r.on("changeState",function(a){"undefined"!=typeof a.disabled&&(m.forEach(function(b,c){b.disabled=a.disabled[c]}),l.disabled=a.disabled),b.update()})}),s.renderEnd("parraleleCoordinateChart immediate"),b}var c=a.models.parallelCoordinates(),d=a.models.legend(),e=a.models.tooltip(),f=(a.models.tooltip(),{top:0,right:0,bottom:0,left:0}),g=null,h=null,i=null,j=!0,k=a.utils.defaultColor(),l=a.utils.state(),m=[],n=!0,o=null,p=null,q="undefined",r=d3.dispatch("dimensionsOrder","brushEnd","stateChange","changeState","renderEnd"),s=a.utils.renderWatch(r),t=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},u=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.contentGenerator(function(a){var b='";return 0!==a.series.length&&(b+='',a.series.forEach(function(a){b=b+'"}),b+=""),b+="
'+a.key+"
'+a.key+''+a.value+"
"}),c.dispatch.on("elementMouseover.tooltip",function(a){var b={key:a.label,color:a.color,series:[]};a.values&&(Object.keys(a.values).forEach(function(c){var d=a.dimensions.filter(function(a){return a.key===c})[0];if(d){var e;e=isNaN(a.values[c])||isNaN(parseFloat(a.values[c]))?q:d.format(a.values[c]),b.series.push({idx:d.currentPosition,key:c,value:e,color:d.color})}}),b.series.sort(function(a,b){return a.idx-b.idx})),e.data(b).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(a){e.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){e()}),b.dispatch=r,b.parallelCoordinates=c,b.legend=d,b.tooltip=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},showLegend:{get:function(){return j},set:function(a){j=a}},defaultState:{get:function(){return o},set:function(a){o=a}},dimensionData:{get:function(){return m},set:function(a){m=a}},displayBrush:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return p},set:function(a){p=a}},nanValue:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return f},set:function(a){void 0!==a.top&&(f.top=a.top,g=a.top),f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),d.color(k),c.color(k)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.pie=function(){"use strict";function b(G){return F.reset(),G.each(function(b){function G(a,b){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,q||(a.innerRadius=0);var c=d3.interpolate(this._current,a);return this._current=c(0),function(a){return D[b](c(a))}}var H=d-c.left-c.right,I=e-c.top-c.bottom,J=Math.min(H,I)/2,K=[],L=[];if(i=d3.select(this),0===B.length)for(var M=J-J/10,N=z*J,O=0;O=o){var f=ca(d);_[f]&&(d[1]-=aa),_[ca(d)]=!0}return"translate("+d+")"}),Y.select(".nv-label text").style("text-anchor",function(a,b){return u?(a.startAngle+a.endAngle)/2c)return"";if("function"==typeof n)d=n(a,b,{key:f(a.data),value:g(a.data),percent:k(c)});else switch(n){case"key":d=f(a.data);break;case"value":d=k(g(a.data));break;case"percent":d=d3.format("%")(c)}return d}),p&&Y.each(function(b,c){if(this.getBBox){var d=this.getBBox(),e=$[c].centroid(b),f={x:e[0]+d.x,y:e[1]+d.y},g={x:f.x+d.width,y:f.y},h={x:f.x,y:f.y+d.height},i={x:f.x+d.width,y:f.y+d.height};b.visible=a.utils.pointIsInArc(f,b,U)&&a.utils.pointIsInArc(g,b,U)&&a.utils.pointIsInArc(h,b,U)&&a.utils.pointIsInArc(i,b,U)}}).style("display",function(a){return a.visible?null:"none"})}}),F.renderEnd("pie immediate"),b}var c={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.x},g=function(a){return a.y},h=Math.floor(1e4*Math.random()),i=null,j=a.utils.defaultColor(),k=d3.format(",.2f"),l=!0,m=!1,n="key",o=.02,p=!1,q=!1,r=!1,s=!0,t=0,u=!1,v=!1,w=!1,x=!1,y=0,z=.5,A=250,B=[],C=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),D=[],E=[],F=a.utils.renderWatch(C);return b.dispatch=C,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{arcsRadius:{get:function(){return B},set:function(a){B=a}},width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},showLabels:{get:function(){return l},set:function(a){l=a}},title:{get:function(){return r},set:function(a){r=a}},titleOffset:{get:function(){return t},set:function(a){t=a}},labelThreshold:{get:function(){return o},set:function(a){o=a}},hideOverlapLabels:{get:function(){ +return p},set:function(a){p=a}},valueFormat:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return h},set:function(a){h=a}},endAngle:{get:function(){return x},set:function(a){x=a}},startAngle:{get:function(){return v},set:function(a){v=a}},padAngle:{get:function(){return w},set:function(a){w=a}},cornerRadius:{get:function(){return y},set:function(a){y=a}},donutRatio:{get:function(){return z},set:function(a){z=a}},labelsOutside:{get:function(){return m},set:function(a){m=a}},labelSunbeamLayout:{get:function(){return u},set:function(a){u=a}},donut:{get:function(){return q},set:function(a){q=a}},growOnHover:{get:function(){return s},set:function(a){s=a}},pieLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return k},set:function(b){k=b,a.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return c},set:function(a){c.top="undefined"!=typeof a.top?a.top:c.top,c.right="undefined"!=typeof a.right?a.right:c.right,c.bottom="undefined"!=typeof a.bottom?a.bottom:c.bottom,c.left="undefined"!=typeof a.left?a.left:c.left}},duration:{get:function(){return A},set:function(a){A=a,F.reset(A)}},y:{get:function(){return g},set:function(a){g=d3.functor(a)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},labelType:{get:function(){return n},set:function(a){n=a||"key"}}}),a.utils.initOptions(b),b},a.models.pieChart=function(){"use strict";function b(e){return s.reset(),s.models(c),e.each(function(e){var j=d3.select(this);a.utils.initSVG(j);var m=a.utils.availableWidth(h,j,f),p=a.utils.availableHeight(i,j,f);if(b.update=function(){j.transition().call(b)},b.container=this,n.setter(u(e),b.update).getter(t(e)).update(),n.disabled=e.map(function(a){return!!a.disabled}),!o){var q;o={};for(q in n)n[q]instanceof Array?o[q]=n[q].slice(0):o[q]=n[q]}if(!e||!e.length)return a.utils.noData(b,j),b;j.selectAll(".nv-noData").remove();var s=j.selectAll("g.nv-wrap.nv-pieChart").data([e]),v=s.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),w=s.select("g");if(v.append("g").attr("class","nv-pieWrap"),v.append("g").attr("class","nv-legendWrap"),k)if("top"===l)d.width(m).key(c.x()),s.select(".nv-legendWrap").datum(e).call(d),g||d.height()===f.top||(f.top=d.height(),p=a.utils.availableHeight(i,j,f)),s.select(".nv-legendWrap").attr("transform","translate(0,"+-f.top+")");else if("right"===l){var x=a.models.legend().width();x>m/2&&(x=m/2),d.height(p).key(c.x()),d.width(x),m-=d.width(),s.select(".nv-legendWrap").datum(e).call(d).attr("transform","translate("+m+",0)")}else"bottom"===l&&(d.width(m).key(c.x()),s.select(".nv-legendWrap").datum(e).call(d),f.bottom=d.height(),p=a.utils.availableHeight(i,j,f),s.select(".nv-legendWrap").attr("transform","translate(0,"+p+")"));else w.select(".nv-legendWrap").selectAll("*").remove();s.attr("transform","translate("+f.left+","+f.top+")"),c.width(m).height(p);var y=w.select(".nv-pieWrap").datum([e]);d3.transition(y).call(c),d.dispatch.on("stateChange",function(a){for(var c in a)n[c]=a[c];r.stateChange(n),b.update()}),r.on("changeState",function(a){"undefined"!=typeof a.disabled&&(e.forEach(function(b,c){b.disabled=a.disabled[c]}),n.disabled=a.disabled),b.update()})}),s.renderEnd("pieChart immediate"),b}var c=a.models.pie(),d=a.models.legend(),e=a.models.tooltip(),f={top:30,right:20,bottom:20,left:20},g=null,h=null,i=null,j=!1,k=!0,l="top",m=a.utils.defaultColor(),n=a.utils.state(),o=null,p=null,q=250,r=d3.dispatch("stateChange","changeState","renderEnd");e.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return c.valueFormat()(a,b)});var s=a.utils.renderWatch(r),t=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},u=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color,percent:a.percent},j||(delete a.percent,delete a.series.percent),e.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(a){e.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(a){e()}),b.legend=d,b.dispatch=r,b.pie=c,b.tooltip=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},noData:{get:function(){return p},set:function(a){p=a}},showTooltipPercent:{get:function(){return j},set:function(a){j=a}},showLegend:{get:function(){return k},set:function(a){k=a}},legendPosition:{get:function(){return l},set:function(a){l=a}},defaultState:{get:function(){return o},set:function(a){o=a}},color:{get:function(){return m},set:function(a){m=a,d.color(m),c.color(m)}},duration:{get:function(){return q},set:function(a){q=a,s.reset(q),c.duration(q)}},margin:{get:function(){return f},set:function(a){void 0!==a.top&&(f.top=a.top,g=a.top),f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.sankey=function(){"use strict";function b(){n.forEach(function(a){a.sourceLinks=[],a.targetLinks=[]}),o.forEach(function(a){var b=a.source,c=a.target;"number"==typeof b&&(b=a.source=n[a.source]),"number"==typeof c&&(c=a.target=n[a.target]),b.sourceLinks.push(a),c.targetLinks.push(a)})}function c(){n.forEach(function(a){a.value=Math.max(d3.sum(a.sourceLinks,i),d3.sum(a.targetLinks,i))})}function d(){for(var a,b=n,c=0;b.length&&cd;++d)b=a[d],c=e-b.y,c>0&&(b.y+=c),e=b.y+b.dy+l;if(c=e-l-m[1],c>0)for(e=b.y-=c,d=g-2;d>=0;--d)b=a[d],c=b.y+b.dy+l-e,c>0&&(b.y-=c),e=b.y})}function f(a,b){return a.y-b.y}var g=d3.nest().key(function(a){return a.x}).sortKeys(d3.ascending).entries(n).map(function(a){return a.values});b(),e(),h();for(var j=1;a>0;--a)d(j*=.99),e(),h(),c(j),e(),h()}function h(){function a(a,b){return a.source.y-b.source.y}function b(a,b){return a.target.y-b.target.y}n.forEach(function(c){c.sourceLinks.sort(b),c.targetLinks.sort(a)}),n.forEach(function(a){var b=0,c=0;a.sourceLinks.forEach(function(a){a.sy=b,b+=a.dy}),a.targetLinks.forEach(function(a){a.ty=c,c+=a.dy})})}function i(a){return a.value}var j={},k=24,l=8,m=[1,1],n=[],o=[],p=!0,q=function(a){b(),c(),d(),g(a)},r=function(){h()},s=function(){function a(a){var c=a.source.x+a.source.dx,d=a.target.x,e=d3.interpolateNumber(c,d),f=e(b),g=e(1-b),h=a.source.y+a.sy+a.dy/2,i=a.target.y+a.ty+a.dy/2,j="M"+c+","+h+"C"+f+","+h+" "+g+","+i+" "+d+","+i;return j}var b=.5;return a.curvature=function(c){return arguments.length?(b=+c,a):b},a},t=function(a){return a.y+a.dy/2};return j.options=a.utils.optionsFunc.bind(j),j._options=Object.create({},{nodeWidth:{get:function(){return k},set:function(a){k=+a}},nodePadding:{get:function(){return l},set:function(a){l=a}},nodes:{get:function(){return n},set:function(a){n=a}},links:{get:function(){return o},set:function(a){o=a}},size:{get:function(){return m},set:function(a){m=a}},sinksRight:{get:function(){return p},set:function(a){p=a}},layout:{get:function(){q(32)},set:function(a){q(a)}},relayout:{get:function(){r()},set:function(a){}},center:{get:function(){return t()},set:function(a){"function"==typeof a&&(t=a)}},link:{get:function(){return s()},set:function(a){return"function"==typeof a&&(s=a),s()}}}),a.utils.initOptions(j),j},a.models.sankeyChart=function(){"use strict";function b(a){return a.each(function(b){function c(a){d3.select(this).attr("transform","translate("+a.x+","+(a.y=Math.max(0,Math.min(f-a.dy,d3.event.y)))+")"),d.relayout(),t.attr("d",s)}var i={nodes:[{node:1,name:"Test 1"},{node:2,name:"Test 2"},{node:3,name:"Test 3"},{node:4,name:"Test 4"},{node:5,name:"Test 5"},{node:6,name:"Test 6"}],links:[{source:0,target:1,value:2295},{source:0,target:5,value:1199},{source:1,target:2,value:1119},{source:1,target:5,value:1176},{source:2,target:3,value:487},{source:2,target:5,value:632},{source:3,target:4,value:301},{source:3,target:5,value:186}]},k=!1,l=!1;if(("object"==typeof b.nodes&&b.nodes.length)>=0&&("object"==typeof b.links&&b.links.length)>=0&&(k=!0),b.nodes&&b.nodes.length>0&&b.links&&b.links.length>0&&(l=!0),!k)return console.error("NVD3 Sankey chart error:","invalid data format for",b),console.info("Valid data format is: ",i,JSON.stringify(i)),r(a,"Error loading chart, data is invalid"),!1;if(!l)return r(a,"No data available"),!1;var m=a.append("svg").attr("width",e).attr("height",f).append("g").attr("class","nvd3 nv-wrap nv-sankeyChart");d.nodeWidth(g).nodePadding(h).size([e,f]);var s=d.link();d.nodes(b.nodes).links(b.links).layout(32).center(j);var t=m.append("g").selectAll(".link").data(b.links).enter().append("path").attr("class","link").attr("d",s).style("stroke-width",function(a){return Math.max(1,a.dy)}).sort(function(a,b){return b.dy-a.dy});t.append("title").text(n);var u=m.append("g").selectAll(".node").data(b.nodes).enter().append("g").attr("class","node").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).call(d3.behavior.drag().origin(function(a){return a}).on("dragstart",function(){this.parentNode.appendChild(this)}).on("drag",c));u.append("rect").attr("height",function(a){return a.dy}).attr("width",d.nodeWidth()).style("fill",o).style("stroke",p).append("title").text(q),u.append("text").attr("x",-6).attr("y",function(a){return a.dy/2}).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text(function(a){return a.name}).filter(function(a){return a.x0?aa+20:0),la.attr("clip-path",I?"url(#nv-edge-clip-"+s+")":""),Y=!0;var ma=ha.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});ma.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),ma.exit().remove(),ma.attr("class",function(a,b){return(a.classed||"")+" nv-group nv-series-"+b}).classed("nv-noninteractive",!E).classed("hover",function(a){return a.hover}),ma.watchTransition(Z,"scatter: groups").style("fill",function(a,b){return q(a,b)}).style("stroke",function(a,b){return a.pointBorderColor||r||q(a,b)}).style("stroke-opacity",1).style("fill-opacity",.5);var na=ma.selectAll("path.nv-point").data(function(a){return a.values.map(function(a,b){return[a,b]}).filter(function(a,b){return F(a[0],b)})});if(na.enter().append("path").attr("class",function(a){return"nv-point nv-point-"+a[1]}).style("fill",function(a){return a.color}).style("stroke",function(a){return a.color}).attr("transform",function(b){return"translate("+a.utils.NaNtoZero(f(x(b[0],b[1])))+","+a.utils.NaNtoZero(g(y(b[0],b[1])))+")"}).attr("d",a.utils.symbol().type(function(a){return A(a[0])}).size(function(a){return w(z(a[0],a[1]))})),na.exit().each(c).remove(),ma.exit().selectAll("path.nv-point").watchTransition(Z,"scatter exit").attr("transform",function(b){return"translate("+a.utils.NaNtoZero(u(x(b[0],b[1])))+","+a.utils.NaNtoZero(v(y(b[0],b[1])))+")"}).remove(),na.filter(function(a){return d(a,"x",x,"y",y)||ea||fa||ga}).watchTransition(Z,"scatter points").attr("transform",function(b){return"translate("+a.utils.NaNtoZero(u(x(b[0],b[1])))+","+a.utils.NaNtoZero(v(y(b[0],b[1])))+")"}),na.filter(function(a){return d(a,"shape",A,"size",z)||ea||fa||ga}).watchTransition(Z,"scatter points").attr("d",a.utils.symbol().type(function(a){return A(a[0])}).size(function(a){return w(z(a[0],a[1]))})),X){var oa=ma.selectAll(".nv-label").data(function(a){return a.values.map(function(a,b){return[a,b]}).filter(function(a,b){return F(a[0],b)})});oa.enter().append("text").style("fill",function(a,b){return a.color}).style("stroke-opacity",0).style("fill-opacity",1).attr("transform",function(b){var c=a.utils.NaNtoZero(f(x(b[0],b[1])))+Math.sqrt(w(z(b[0],b[1]))/Math.PI)+2;return"translate("+c+","+a.utils.NaNtoZero(g(y(b[0],b[1])))+")"}).text(function(a,b){return a[0].label}),oa.exit().remove(),ma.exit().selectAll("path.nv-label").watchTransition(Z,"scatter exit").attr("transform",function(b){var c=a.utils.NaNtoZero(u(x(b[0],b[1])))+Math.sqrt(w(z(b[0],b[1]))/Math.PI)+2;return"translate("+c+","+a.utils.NaNtoZero(v(y(b[0],b[1])))+")"}).remove(),oa.each(function(a){d3.select(this).classed("nv-label",!0).classed("nv-label-"+a[1],!1).classed("hover",!1)}),oa.watchTransition(Z,"scatter labels").attr("transform",function(b){var c=a.utils.NaNtoZero(u(x(b[0],b[1])))+Math.sqrt(w(z(b[0],b[1]))/Math.PI)+2;return"translate("+c+","+a.utils.NaNtoZero(v(y(b[0],b[1])))+")"})}W?(clearTimeout(m),m=setTimeout(V,W)):V(),f=u.copy(),g=v.copy(),h=w.copy(),k=o,l=p}),Z.renderEnd("scatter immediate"),e}var f,g,h,i,j,k,l,m,n={top:0,right:0,bottom:0,left:0},o=null,p=null,q=a.utils.defaultColor(),r=null,s=Math.floor(1e5*Math.random()),t=null,u=d3.scale.linear(),v=d3.scale.linear(),w=d3.scale.linear(),x=function(a){return a.x},y=function(a){return a.y},z=function(a){return a.size||1},A=function(a){return a.shape||"circle"},B=[],C=[],D=[],E=!0,F=function(a){return!a.notActive},G=!1,H=.1,I=!1,J=!0,K=!1,L=function(){return 25},M=null,N=null,O=null,P=null,Q=null,R=null,S=!1,T=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),U=!0,V=250,W=300,X=!1,Y=!1,Z=a.utils.renderWatch(T,V),$=[16,256],_={};return e.dispatch=T,e.options=a.utils.optionsFunc.bind(e),e._calls=new function(){this.clearHighlights=function(){return a.dom.write(function(){t.selectAll(".nv-point.hover").classed("hover",!1)}),null},this.highlightPoint=function(b,c,d){a.dom.write(function(){t.select(".nv-groups").selectAll(".nv-series-"+b).selectAll(".nv-point-"+c).classed("hover",d)})}},T.on("elementMouseover.point",function(a){E&&e._calls.highlightPoint(a.seriesIndex,a.pointIndex,!0)}),T.on("elementMouseout.point",function(a){E&&e._calls.highlightPoint(a.seriesIndex,a.pointIndex,!1)}),e._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},xScale:{get:function(){return u},set:function(a){u=a}},yScale:{get:function(){return v},set:function(a){v=a}},pointScale:{get:function(){return w},set:function(a){w=a}},xDomain:{get:function(){return M},set:function(a){M=a}},yDomain:{get:function(){return N},set:function(a){N=a}},pointDomain:{get:function(){return Q},set:function(a){Q=a}},xRange:{get:function(){return O},set:function(a){O=a}},yRange:{get:function(){return P},set:function(a){P=a}},pointRange:{get:function(){return R},set:function(a){R=a}},forceX:{get:function(){return B},set:function(a){B=a}},forceY:{get:function(){return C},set:function(a){C=a}},forcePoint:{get:function(){return D},set:function(a){D=a}},interactive:{get:function(){return E},set:function(a){E=a}},pointActive:{get:function(){return F},set:function(a){F=a}},padDataOuter:{get:function(){return H},set:function(a){H=a}},padData:{get:function(){return G},set:function(a){G=a}},clipEdge:{get:function(){return I},set:function(a){I=a}},clipVoronoi:{get:function(){return J},set:function(a){J=a}},clipRadius:{get:function(){return L},set:function(a){L=a}},showVoronoi:{get:function(){return K},set:function(a){K=a}},id:{get:function(){return s},set:function(a){s=a}},interactiveUpdateDelay:{get:function(){return W},set:function(a){W=a}},showLabels:{get:function(){return X},set:function(a){X=a}},pointBorderColor:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return x},set:function(a){x=d3.functor(a)}},y:{get:function(){return y},set:function(a){y=d3.functor(a)}},pointSize:{get:function(){return z},set:function(a){z=d3.functor(a)}},pointShape:{get:function(){return A},set:function(a){A=d3.functor(a)}},margin:{get:function(){return n},set:function(a){n.top=void 0!==a.top?a.top:n.top,n.right=void 0!==a.right?a.right:n.right,n.bottom=void 0!==a.bottom?a.bottom:n.bottom,n.left=void 0!==a.left?a.left:n.left}},duration:{get:function(){return V},set:function(a){V=a,Z.reset(V)}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}},useVoronoi:{get:function(){return U},set:function(a){U=a,U===!1&&(J=!1)}}}),a.utils.initOptions(e),e},a.models.scatterChart=function(){"use strict";function b(A){return F.reset(),F.models(c),u&&F.models(d),v&&F.models(e),r&&F.models(g),s&&F.models(h),A.each(function(A){n=d3.select(this),a.utils.initSVG(n);var I=a.utils.availableWidth(l,n,j),J=a.utils.availableHeight(m,n,j);if(b.update=function(){0===B?n.call(b):n.transition().duration(B).call(b)},b.container=this,x.setter(H(A),b.update).getter(G(A)).update(),x.disabled=A.map(function(a){return!!a.disabled}),!y){var K;y={};for(K in x)x[K]instanceof Array?y[K]=x[K].slice(0):y[K]=x[K]}if(!(A&&A.length&&A.filter(function(a){return a.values.length}).length))return a.utils.noData(b,n),F.renderEnd("scatter immediate"),b;n.selectAll(".nv-noData").remove(),p=c.xScale(),q=c.yScale();var L=n.selectAll("g.nv-wrap.nv-scatterChart").data([A]),M=L.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+c.id()),N=M.append("g"),O=L.select("g");if(N.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-scatterWrap"),N.append("g").attr("class","nv-regressionLinesWrap"),N.append("g").attr("class","nv-distWrap"),N.append("g").attr("class","nv-legendWrap"),w&&O.select(".nv-y.nv-axis").attr("transform","translate("+I+",0)"),t){var P=I;f.width(P),L.select(".nv-legendWrap").datum(A).call(f),k||f.height()===j.top||(j.top=f.height(),J=a.utils.availableHeight(m,n,j)),L.select(".nv-legendWrap").attr("transform","translate(0,"+-j.top+")")}else O.select(".nv-legendWrap").selectAll("*").remove();L.attr("transform","translate("+j.left+","+j.top+")"),c.width(I).height(J).color(A.map(function(a,b){return a.color=a.color||o(a,b),a.color}).filter(function(a,b){return!A[b].disabled})).showLabels(C),L.select(".nv-scatterWrap").datum(A.filter(function(a){return!a.disabled})).call(c),L.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+c.id()+")");var Q=L.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a});Q.enter().append("g").attr("class","nv-regLines");var R=Q.selectAll(".nv-regLine").data(function(a){return[a]});R.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),R.filter(function(a){return a.intercept&&a.slope}).watchTransition(F,"scatterPlusLineChart: regline").attr("x1",p.range()[0]).attr("x2",p.range()[1]).attr("y1",function(a,b){return q(p.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a,b){return q(p.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return o(a,c)}).style("stroke-opacity",function(a,b){return a.disabled||"undefined"==typeof a.slope||"undefined"==typeof a.intercept?0:1}),u&&(d.scale(p)._ticks(a.utils.calcTicksX(I/100,A)).tickSize(-J,0),O.select(".nv-x.nv-axis").attr("transform","translate(0,"+q.range()[0]+")").call(d)),v&&(e.scale(q)._ticks(a.utils.calcTicksY(J/36,A)).tickSize(-I,0),O.select(".nv-y.nv-axis").call(e)),r&&(g.getData(c.x()).scale(p).width(I).color(A.map(function(a,b){return a.color||o(a,b)}).filter(function(a,b){return!A[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),O.select(".nv-distributionX").attr("transform","translate(0,"+q.range()[0]+")").datum(A.filter(function(a){return!a.disabled})).call(g)),s&&(h.getData(c.y()).scale(q).width(J).color(A.map(function(a,b){return a.color||o(a,b)}).filter(function(a,b){return!A[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),O.select(".nv-distributionY").attr("transform","translate("+(w?I:-h.size())+",0)").datum(A.filter(function(a){return!a.disabled})).call(h)),f.dispatch.on("stateChange",function(a){for(var c in a)x[c]=a[c];z.stateChange(x),b.update()}),z.on("changeState",function(a){"undefined"!=typeof a.disabled&&(A.forEach(function(b,c){b.disabled=a.disabled[c]}),x.disabled=a.disabled),b.update()}),c.dispatch.on("elementMouseout.tooltip",function(a){i.hidden(!0),n.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),n.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",h.size())}),c.dispatch.on("elementMouseover.tooltip",function(a){n.select(".nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.relativePos[1]-J),n.select(".nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.relativePos[0]+g.size()),i.data(a).hidden(!1)}),D=p.copy(),E=q.copy()}),F.renderEnd("scatter with line immediate"),b}var c=a.models.scatter(),d=a.models.axis(),e=a.models.axis(),f=a.models.legend(),g=a.models.distribution(),h=a.models.distribution(),i=a.models.tooltip(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=null,n=null,o=a.utils.defaultColor(),p=c.xScale(),q=c.yScale(),r=!1,s=!1,t=!0,u=!0,v=!0,w=!1,x=a.utils.state(),y=null,z=d3.dispatch("stateChange","changeState","renderEnd"),A=null,B=250,C=!1;c.xScale(p).yScale(q),d.orient("bottom").tickPadding(10),e.orient(w?"right":"left").tickPadding(10),g.axis("x"),h.axis("y"),i.headerFormatter(function(a,b){return d.tickFormat()(a,b)}).valueFormatter(function(a,b){return e.tickFormat()(a,b)});var D,E,F=a.utils.renderWatch(z,B),G=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},H=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return b.dispatch=z,b.scatter=c,b.legend=f,b.xAxis=d,b.yAxis=e,b.distX=g,b.distY=h,b.tooltip=i,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},container:{get:function(){return n},set:function(a){n=a}},showDistX:{get:function(){return r},set:function(a){r=a}},showDistY:{get:function(){return s},set:function(a){s=a}},showLegend:{get:function(){return t},set:function(a){t=a}},showXAxis:{get:function(){return u},set:function(a){u=a}},showYAxis:{get:function(){return v},set:function(a){v=a}},defaultState:{get:function(){return y},set:function(a){y=a}},noData:{get:function(){return A},set:function(a){A=a}},duration:{get:function(){return B},set:function(a){B=a}},showLabels:{get:function(){return C},set:function(a){C=a}},margin:{get:function(){return j},set:function(a){void 0!==a.top&&(j.top=a.top,k=a.top),j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},rightAlignYAxis:{get:function(){return w},set:function(a){w=a,e.orient(a?"right":"left")}},color:{get:function(){return o},set:function(b){o=a.utils.getColor(b),f.color(o),g.color(o),h.color(o)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.sparkline=function(){"use strict";function b(k){return t.reset(),k.each(function(b){var k=h-g.left-g.right,s=i-g.top-g.bottom;j=d3.select(this),a.utils.initSVG(j),l.domain(c||d3.extent(b,n)).range(e||[0,k]),m.domain(d||d3.extent(b,o)).range(f||[s,0]);var t=j.selectAll("g.nv-wrap.nv-sparkline").data([b]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");u.append("g"),t.select("g");t.attr("transform","translate("+g.left+","+g.top+")");var v=t.selectAll("path").data(function(a){return[a]});v.enter().append("path"), +v.exit().remove(),v.style("stroke",function(a,b){return a.color||p(a,b)}).attr("d",d3.svg.line().x(function(a,b){return l(n(a,b))}).y(function(a,b){return m(o(a,b))}));var w=t.selectAll("circle.nv-point").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return o(a,b)}),d=b(c.lastIndexOf(m.domain()[1])),e=b(c.indexOf(m.domain()[0])),f=b(c.length-1);return[q?e:null,q?d:null,r?f:null].filter(function(a){return null!=a})});w.enter().append("circle"),w.exit().remove(),w.attr("cx",function(a,b){return l(n(a,a.pointIndex))}).attr("cy",function(a,b){return m(o(a,a.pointIndex))}).attr("r",2).attr("class",function(a,b){return n(a,a.pointIndex)==l.domain()[1]?"nv-point nv-currentValue":o(a,a.pointIndex)==m.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),t.renderEnd("sparkline immediate"),b}var c,d,e,f,g={top:2,right:0,bottom:2,left:0},h=400,i=32,j=null,k=!0,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=a.utils.getColor(["#000"]),q=!0,r=!0,s=d3.dispatch("renderEnd"),t=a.utils.renderWatch(s);return b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},animate:{get:function(){return k},set:function(a){k=a}},showMinMaxPoints:{get:function(){return q},set:function(a){q=a}},showCurrentPoint:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return n},set:function(a){n=d3.functor(a)}},y:{get:function(){return o},set:function(a){o=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b)}}}),b.dispatch=s,a.utils.initOptions(b),b},a.models.sparklinePlus=function(){"use strict";function b(p){return r.reset(),r.models(e),p.each(function(p){function q(){if(!j){var a=z.selectAll(".nv-hoverValue").data(i),b=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+c(e.x()(p[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),i.length&&(b.append("line").attr("x1",0).attr("y1",-f.top).attr("x2",0).attr("y2",u),b.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-f.top).attr("text-anchor","end").attr("dy",".9em"),z.select(".nv-hoverValue .nv-xValue").text(k(e.x()(p[i[0]],i[0]))),b.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-f.top).attr("text-anchor","start").attr("dy",".9em"),z.select(".nv-hoverValue .nv-yValue").text(l(e.y()(p[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;fc;++c){for(b=0,d=0;bb;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=0}for(c=0;f>c;++c)g[c]=0;return g}}),v.renderEnd("stackedArea immediate"),b}var c,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=a.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=null,k=function(a){return a.x},l=function(a){return a.y},m=function(a,b){return!isNaN(l(a,b))&&null!==l(a,b)},n="stack",o="zero",p="default",q="linear",r=!1,s=a.models.scatter(),t=250,u=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");s.pointSize(2.2).pointDomain([2.2,2.2]);var v=a.utils.renderWatch(u,t);return b.dispatch=u,b.scatter=s,s.dispatch.on("elementClick",function(){u.elementClick.apply(this,arguments)}),s.dispatch.on("elementMouseover",function(){u.elementMouseover.apply(this,arguments)}),s.dispatch.on("elementMouseout",function(){u.elementMouseout.apply(this,arguments)}),b.interpolate=function(a){return arguments.length?(q=a,b):q},b.duration=function(a){return arguments.length?(t=a,v.reset(t),s.duration(t),b):t},b.dispatch=u,b.scatter=s,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return f},set:function(a){f=a}},height:{get:function(){return g},set:function(a){g=a}},defined:{get:function(){return m},set:function(a){m=a}},clipEdge:{get:function(){return r},set:function(a){r=a}},offset:{get:function(){return o},set:function(a){o=a}},order:{get:function(){return p},set:function(a){p=a}},interpolate:{get:function(){return q},set:function(a){q=a}},x:{get:function(){return k},set:function(a){k=d3.functor(a)}},y:{get:function(){return l},set:function(a){l=d3.functor(a)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}},style:{get:function(){return n},set:function(a){switch(n=a){case"stack":b.offset("zero"),b.order("default");break;case"stream":b.offset("wiggle"),b.order("inside-out");break;case"stream-center":b.offset("silhouette"),b.order("inside-out");break;case"expand":b.offset("expand"),b.order("default");break;case"stack_percent":b.offset(b.d3_stackedOffset_stackPercent),b.order("default")}}},duration:{get:function(){return t},set:function(a){t=a,v.reset(t),s.duration(t)}}}),a.utils.inheritOptions(b,s),a.utils.initOptions(b),b},a.models.stackedAreaChart=function(){"use strict";function b(k){return L.reset(),L.models(e),u&&L.models(f),v&&L.models(g),k.each(function(k){function D(){u&&X.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+T+")").transition().duration(I).call(f)}function L(){if(v){if("expand"===e.style()||"stack_percent"===e.style()){var a=g.tickFormat();J&&a===P||(J=a),g.tickFormat(P)}else J&&(g.tickFormat(J),J=null);X.select(".nv-focus .nv-y.nv-axis").transition().duration(0).call(g)}}function Q(a){var b=X.select(".nv-focus .nv-stackedWrap").datum(k.filter(function(a){return!a.disabled}).map(function(b,c){return{key:b.key,area:b.area,classed:b.classed,values:b.values.filter(function(b,c){return e.x()(b,c)>=a[0]&&e.x()(b,c)<=a[1]}),disableTooltip:b.disableTooltip}}));b.transition().duration(I).call(e),D(),L()}var R=d3.select(this);a.utils.initSVG(R);var S=a.utils.availableWidth(o,R,m),T=a.utils.availableHeight(p,R,m)-(x?l.height():0);if(b.update=function(){R.transition().duration(I).call(b)},b.container=this,B.setter(O(k),b.update).getter(N(k)).update(),B.disabled=k.map(function(a){return!!a.disabled}),!C){var U;C={};for(U in B)B[U]instanceof Array?C[U]=B[U].slice(0):C[U]=B[U]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(b,R),b;R.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var V=R.selectAll("g.nv-wrap.nv-stackedAreaChart").data([k]),W=V.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),X=V.select("g");W.append("g").attr("class","nv-legendWrap"),W.append("g").attr("class","nv-controlsWrap");var Y=W.append("g").attr("class","nv-focus");Y.append("g").attr("class","nv-background").append("rect"),Y.append("g").attr("class","nv-x nv-axis"),Y.append("g").attr("class","nv-y nv-axis"),Y.append("g").attr("class","nv-stackedWrap"),Y.append("g").attr("class","nv-interactive");W.append("g").attr("class","nv-focusWrap");if(s){var Z=r&&"top"===t?S-F:S;if(h.width(Z),X.select(".nv-legendWrap").datum(k).call(h),"bottom"===t){var $=(u?12:0)+10;m.bottom=Math.max(h.height()+$,m.bottom),T=a.utils.availableHeight(p,R,m)-(x?l.height():0);var _=T+$;X.select(".nv-legendWrap").attr("transform","translate(0,"+_+")")}else"top"===t&&(n||m.top==h.height()||(m.top=h.height(),T=a.utils.availableHeight(p,R,m)-(x?l.height():0)),X.select(".nv-legendWrap").attr("transform","translate("+(S-Z)+","+-m.top+")"))}else X.select(".nv-legendWrap").selectAll("*").remove();if(r){var aa=[{key:H.stacked||"Stacked",metaKey:"Stacked",disabled:"stack"!=e.style(),style:"stack"},{key:H.stream||"Stream",metaKey:"Stream",disabled:"stream"!=e.style(),style:"stream"},{key:H.expanded||"Expanded",metaKey:"Expanded",disabled:"expand"!=e.style(),style:"expand"},{key:H.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:"stack_percent"!=e.style(),style:"stack_percent"}];F=G.length/3*260,aa=aa.filter(function(a){return-1!==G.indexOf(a.metaKey)}),i.width(F).color(["#444","#444","#444"]),X.select(".nv-controlsWrap").datum(aa).call(i);var ba=Math.max(i.height(),s&&"top"===t?h.height():0);m.top!=ba&&(m.top=ba,T=a.utils.availableHeight(p,R,m)-(x?l.height():0)),X.select(".nv-controlsWrap").attr("transform","translate(0,"+-m.top+")")}else X.select(".nv-controlsWrap").selectAll("*").remove();V.attr("transform","translate("+m.left+","+m.top+")"),w&&X.select(".nv-y.nv-axis").attr("transform","translate("+S+",0)"),y&&(j.width(S).height(T).margin({left:m.left,top:m.top}).svgContainer(R).xScale(c),V.select(".nv-interactive").call(j)),X.select(".nv-focus .nv-background rect").attr("width",S).attr("height",T),e.width(S).height(T).color(k.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!k[b].disabled}));var ca=X.select(".nv-focus .nv-stackedWrap").datum(k.filter(function(a){return!a.disabled}));if(u&&f.scale(c)._ticks(a.utils.calcTicksX(S/100,k)).tickSize(-T,0),v){var da;da="wiggle"===e.offset()?0:a.utils.calcTicksY(T/36,k),g.scale(d)._ticks(da).tickSize(-S,0)}if(x){l.width(S),X.select(".nv-focusWrap").attr("transform","translate(0,"+(T+m.bottom+l.margin().top)+")").datum(k.filter(function(a){return!a.disabled})).call(l);var ea=l.brush.empty()?l.xDomain():l.brush.extent();null!==ea&&Q(ea)}else ca.transition().call(e),D(),L();e.dispatch.on("areaClick.toggle",function(a){1===k.filter(function(a){return!a.disabled}).length?k.forEach(function(a){a.disabled=!1}):k.forEach(function(b,c){b.disabled=c!=a.seriesIndex}),B.disabled=k.map(function(a){return!!a.disabled}),E.stateChange(B),b.update()}),h.dispatch.on("stateChange",function(a){for(var c in a)B[c]=a[c];E.stateChange(B),b.update()}),i.dispatch.on("legendClick",function(a,c){a.disabled&&(aa=aa.map(function(a){return a.disabled=!0,a}),a.disabled=!1,e.style(a.style),B.style=e.style(),E.stateChange(B),b.update())}),j.dispatch.on("elementMousemove",function(c){e.clearHighlights();var d,f,g,h=[],i=0,l=!0,m=!1;if(k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(j,n){f=a.interactiveBisect(j.values,c.pointXValue,b.x());var o=j.values[f],p=b.y()(o,f);if(null!=p&&p>0&&(e.highlightPoint(n,f,!0),m=!0),n!==k.length-1||m||e.highlightPoint(n,f,!0),"undefined"!=typeof o){"undefined"==typeof d&&(d=o),"undefined"==typeof g&&(g=b.xScale()(b.x()(o,f)));var r="expand"==e.style()?o.display.y:b.y()(o,f);h.push({key:j.key,value:r,color:q(j,j.seriesIndex),point:o}),z&&"expand"!=e.style()&&null!=r&&(i+=r,l=!1)}}),h.reverse(),h.length>2){var n=b.yScale().invert(c.mouseY),o=null;h.forEach(function(a,b){n=Math.abs(n);var c=Math.abs(a.point.display.y0),d=Math.abs(a.point.display.y);return n>=c&&d+c>=n?void(o=b):void 0}),null!=o&&(h[o].highlight=!0)}z&&"expand"!=e.style()&&h.length>=2&&!l&&h.push({key:A,value:i,total:!0});var p=b.x()(d,f),r=j.tooltip.valueFormatter();"expand"===e.style()||"stack_percent"===e.style()?(K||(K=r),r=d3.format(".1%")):K&&(r=K,K=null),j.tooltip.valueFormatter(r).data({value:p,series:h})(),j.renderGuideLine(g)}),j.dispatch.on("elementMouseout",function(a){e.clearHighlights()}),l.dispatch.on("onBrush",function(a){Q(a)}),E.on("changeState",function(a){"undefined"!=typeof a.disabled&&k.length===a.disabled.length&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),B.disabled=a.disabled),"undefined"!=typeof a.style&&(e.style(a.style),M=a.style),b.update()})}),L.renderEnd("stacked Area chart immediate"),b}var c,d,e=a.models.stackedArea(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l=a.models.focus(a.models.stackedArea()),m={top:10,right:25,bottom:50,left:60},n=null,o=null,p=null,q=a.utils.defaultColor(),r=!0,s=!0,t="top",u=!0,v=!0,w=!1,x=!1,y=!1,z=!0,A="TOTAL",B=a.utils.state(),C=null,D=null,E=d3.dispatch("stateChange","changeState","renderEnd"),F=250,G=["Stacked","Stream","Expanded"],H={},I=250;B.style=e.style(),f.orient("bottom").tickPadding(7),g.orient(w?"right":"left"),k.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)}),j.tooltip.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return null==a?"N/A":g.tickFormat()(a,b)});var J=null,K=null;i.updateState(!1);var L=a.utils.renderWatch(E),M=e.style(),N=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),style:e.style()}}},O=function(a){return function(b){void 0!==b.style&&(M=b.style),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},P=d3.format("%");return e.dispatch.on("elementMouseover.tooltip",function(a){a.point.x=e.x()(a.point),a.point.y=e.y()(a.point),k.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){k.hidden(!0)}),b.dispatch=E,b.stacked=e,b.legend=h,b.controls=i,b.xAxis=f,b.x2Axis=l.xAxis,b.yAxis=g,b.y2Axis=l.yAxis,b.interactiveLayer=j,b.tooltip=k,b.focus=l,b.dispatch=E,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},showLegend:{get:function(){return s},set:function(a){s=a}},legendPosition:{get:function(){return t},set:function(a){t=a}},showXAxis:{get:function(){return u},set:function(a){u=a}},showYAxis:{get:function(){return v},set:function(a){v=a}},defaultState:{get:function(){return C},set:function(a){C=a}},noData:{get:function(){return D},set:function(a){D=a}},showControls:{get:function(){return r},set:function(a){r=a}},controlLabels:{get:function(){return H},set:function(a){H=a}},controlOptions:{get:function(){return G},set:function(a){G=a}},showTotalInTooltip:{get:function(){return z},set:function(a){z=a}},totalLabel:{get:function(){return A},set:function(a){A=a}},focusEnable:{get:function(){return x},set:function(a){x=a}},focusHeight:{get:function(){return l.height()},set:function(a){l.height(a)}},brushExtent:{get:function(){return l.brushExtent()},set:function(a){l.brushExtent(a)}},margin:{get:function(){return m},set:function(a){void 0!==a.top&&(m.top=a.top,n=a.top),m.right=void 0!==a.right?a.right:m.right,m.bottom=void 0!==a.bottom?a.bottom:m.bottom,m.left=void 0!==a.left?a.left:m.left}},focusMargin:{get:function(){return l.margin},set:function(a){l.margin.top=void 0!==a.top?a.top:l.margin.top,l.margin.right=void 0!==a.right?a.right:l.margin.right,l.margin.bottom=void 0!==a.bottom?a.bottom:l.margin.bottom,l.margin.left=void 0!==a.left?a.left:l.margin.left}},duration:{get:function(){return I},set:function(a){I=a,L.reset(I),e.duration(I),f.duration(I),g.duration(I)}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b),h.color(q),e.color(q),l.color(q)}},x:{get:function(){return e.x()},set:function(a){e.x(a),l.x(a)}},y:{get:function(){return e.y()},set:function(a){e.y(a),l.y(a)}},rightAlignYAxis:{get:function(){return w},set:function(a){w=a,g.orient(w?"right":"left")}},useInteractiveGuideline:{get:function(){return y},set:function(a){y=!!a,b.interactive(!a),b.useVoronoi(!a),e.scatter.interactive(!a)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.stackedAreaWithFocusChart=function(){return a.models.stackedAreaChart().margin({bottom:30}).focusEnable(!0)},a.models.sunburst=function(){"use strict";function b(a){var b=c(a);return b>90?180:0}function c(a){var b=Math.max(0,Math.min(2*Math.PI,F(a.x))),c=Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx))),d=(b+c)/2*(180/Math.PI)-90;return d}function d(a){var b=Math.max(0,Math.min(2*Math.PI,F(a.x))),c=Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx)));return(c-b)/(2*Math.PI)}function e(a){var b=Math.max(0,Math.min(2*Math.PI,F(a.x))),c=Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx))),d=c-b;return d>z}function f(a,b){var c=d3.interpolate(F.domain(),[l.x,l.x+l.dx]),d=d3.interpolate(G.domain(),[l.y,1]),e=d3.interpolate(G.range(),[l.y?20:0,o]);return 0===b?function(){return J(a)}:function(b){return F.domain(c(b)),G.domain(d(b)).range(e(b)),J(a)}}function g(a){var b=d3.interpolate({x:a.x0,dx:a.dx0,y:a.y0,dy:a.dy0},a);return function(c){var d=b(c);return a.x0=d.x,a.dx0=d.dx,a.y0=d.y,a.dy0=d.dy,J(d)}}function h(a){var b=B(a);I[b]||(I[b]={});var c=I[b];c.dx=a.dx,c.x=a.x,c.dy=a.dy,c.y=a.y}function i(a){a.forEach(function(a){var b=B(a),c=I[b];c?(a.dx0=c.dx,a.x0=c.x,a.dy0=c.dy,a.y0=c.y):(a.dx0=a.dx,a.x0=a.x,a.dy0=a.dy,a.y0=a.y),h(a)})}function j(a){var d=v.selectAll("text"),g=v.selectAll("path");d.transition().attr("opacity",0),l=a,g.transition().duration(D).attrTween("d",f).each("end",function(d){if(d.x>=a.x&&d.x=a.depth){var f=d3.select(this.parentNode),g=f.select("text");g.transition().duration(D).text(function(a){return y(a)}).attr("opacity",function(a){return e(a)?1:0}).attr("transform",function(){var e=this.getBBox().width;if(0===d.depth)return"translate("+e/2*-1+",0)";if(d.depth===a.depth)return"translate("+(G(d.y)+5)+",0)";var f=c(d),g=b(d);return 0===g?"rotate("+f+")translate("+(G(d.y)+5)+",0)":"rotate("+f+")translate("+(G(d.y)+e+5)+",0)rotate("+g+")"})}})}function k(f){return K.reset(),f.each(function(f){v=d3.select(this),m=a.utils.availableWidth(q,v,p),n=a.utils.availableHeight(r,v,p),o=Math.min(m,n)/2,G.range([0,o]);var h=v.select("g.nvd3.nv-wrap.nv-sunburst");h[0][0]?h.attr("transform","translate("+(m/2+p.left+p.right)+","+(n/2+p.top+p.bottom)+")"):h=v.append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+u).attr("transform","translate("+(m/2+p.left+p.right)+","+(n/2+p.top+p.bottom)+")"),v.on("click",function(a,b){E.chartClick({data:a,index:b,pos:d3.event,id:u})}),H.value(t[s]||t.count);var k=H.nodes(f[0]).reverse();i(k);var l=h.selectAll(".arc-container").data(k,B),z=l.enter().append("g").attr("class","arc-container");z.append("path").attr("d",J).style("fill",function(a){return a.color?a.color:w(C?(a.children?a:a.parent).name:a.name)}).style("stroke","#FFF").on("click",function(a,b){j(a),E.elementClick({data:a,index:b})}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0).style("opacity",.8),E.elementMouseover({data:a,color:d3.select(this).style("fill"),percent:d(a)})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1).style("opacity",1),E.elementMouseout({data:a})}).on("mousemove",function(a,b){E.elementMousemove({data:a})}),l.each(function(a){d3.select(this).select("path").transition().duration(D).attrTween("d",g)}),x&&(l.selectAll("text").remove(),l.append("text").text(function(a){return y(a)}).transition().duration(D).attr("opacity",function(a){return e(a)?1:0}).attr("transform",function(a){var d=this.getBBox().width;if(0===a.depth)return"rotate(0)translate("+d/2*-1+",0)";var e=c(a),f=b(a);return 0===f?"rotate("+e+")translate("+(G(a.y)+5)+",0)":"rotate("+e+")translate("+(G(a.y)+d+5)+",0)rotate("+f+")"})),j(k[k.length-1]),l.exit().transition().duration(D).attr("opacity",0).each("end",function(a){var b=B(a);I[b]=void 0}).remove()}),K.renderEnd("sunburst immediate"),k}var l,m,n,o,p={top:0,right:0,bottom:0,left:0},q=600,r=600,s="count",t={count:function(a){return 1},value:function(a){return a.value||a.size},size:function(a){return a.value||a.size}},u=Math.floor(1e4*Math.random()),v=null,w=a.utils.defaultColor(),x=!1,y=function(a){return"count"===s?a.name+" #"+a.value:a.name+" "+(a.value||a.size)},z=.02,A=function(a,b){return a.name>b.name},B=function(a,b){return void 0!==a.parent?a.name+"-"+a.parent.name+"-"+b:a.name},C=!0,D=500,E=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),F=d3.scale.linear().range([0,2*Math.PI]),G=d3.scale.sqrt(),H=d3.layout.partition().sort(A),I={},J=d3.svg.arc().startAngle(function(a){return Math.max(0,Math.min(2*Math.PI,F(a.x)))}).endAngle(function(a){return Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx)))}).innerRadius(function(a){return Math.max(0,G(a.y))}).outerRadius(function(a){return Math.max(0,G(a.y+a.dy))}),K=a.utils.renderWatch(E);return k.dispatch=E,k.options=a.utils.optionsFunc.bind(k),k._options=Object.create({},{width:{get:function(){return q},set:function(a){q=a}},height:{get:function(){return r},set:function(a){r=a}},mode:{get:function(){return s},set:function(a){s=a}},id:{get:function(){return u},set:function(a){u=a}},duration:{get:function(){return D},set:function(a){D=a}},groupColorByParent:{get:function(){return C},set:function(a){C=!!a}},showLabels:{get:function(){return x},set:function(a){x=!!a}},labelFormat:{get:function(){return y},set:function(a){y=a}},labelThreshold:{get:function(){return z},set:function(a){z=a}},sort:{get:function(){return A},set:function(a){A=a}},key:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return p},set:function(a){p.top=void 0!=a.top?a.top:p.top,p.right=void 0!=a.right?a.right:p.right,p.bottom=void 0!=a.bottom?a.bottom:p.bottom,p.left=void 0!=a.left?a.left:p.left}},color:{get:function(){return w},set:function(b){w=a.utils.getColor(b)}}}),a.utils.initOptions(k),k},a.models.sunburstChart=function(){"use strict";function b(d){return n.reset(),n.models(c),d.each(function(d){var h=d3.select(this);a.utils.initSVG(h);var i=a.utils.availableWidth(f,h,e),j=a.utils.availableHeight(g,h,e);return b.update=function(){0===l?h.call(b):h.transition().duration(l).call(b)},b.container=h,d&&d.length?(h.selectAll(".nv-noData").remove(),c.width(i).height(j).margin(e),void h.call(c)):(a.utils.noData(b,h),b)}),n.renderEnd("sunburstChart immediate"),b}var c=a.models.sunburst(),d=a.models.tooltip(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=a.utils.defaultColor(),i=!1,j=(Math.round(1e5*Math.random()),null),k=null,l=250,m=d3.dispatch("stateChange","changeState","renderEnd"),n=a.utils.renderWatch(m);return d.duration(0).headerEnabled(!1).valueFormatter(function(a){return a}),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.data.name,value:a.data.value||a.data.size,color:a.color,percent:a.percent},i||(delete a.percent,delete a.series.percent),d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(a){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(a){d()}),b.dispatch=m,b.sunburst=c,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return k},set:function(a){k=a}},defaultState:{get:function(){return j},set:function(a){j=a}},showTooltipPercent:{get:function(){return i},set:function(a){i=a}},color:{get:function(){return h},set:function(a){h=a,c.color(h)}},duration:{get:function(){return l},set:function(a){l=a,n.reset(l),c.duration(l)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left,c.margin(e)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.version="1.8.6"}(); +//# sourceMappingURL=nv.d3.min.js.map \ No newline at end of file diff --git a/admin/themes/default/sass/admin-theme.sass b/admin/themes/default/sass/admin-theme.sass index 2ce555165..33b4084b0 100644 --- a/admin/themes/default/sass/admin-theme.sass +++ b/admin/themes/default/sass/admin-theme.sass @@ -106,6 +106,7 @@ @import "partials/ladda" @import "partials/date-picker" @import "partials/select2" +@import "partials/ndv3" //Backward compatibility @import "partials/backward" diff --git a/admin/themes/default/sass/controllers/_dashboard.sass b/admin/themes/default/sass/controllers/_dashboard.sass index eb047a025..f365d445d 100644 --- a/admin/themes/default/sass/controllers/_dashboard.sass +++ b/admin/themes/default/sass/controllers/_dashboard.sass @@ -132,6 +132,12 @@ .data_value display: block text-align: center + .nv-axis.nv-x .tick line, .nv-axis.nv-y .tick line, .nv-interactive .nv-interactiveGuideLine line + display: none + .nvd3.nv-pie path + fill-opacity: 1 + .nv-label text + fill: #FFF!important #dashgoals svg diff --git a/admin/themes/default/sass/controllers/_order.sass b/admin/themes/default/sass/controllers/_order.sass index c5ccaa579..c5315218e 100644 --- a/admin/themes/default/sass/controllers/_order.sass +++ b/admin/themes/default/sass/controllers/_order.sass @@ -4,15 +4,76 @@ #customization_list border: 0px +.booking_occupancy_edit, .booking_occupancy + .occupancy-info-separator + margin-top: 0px + margin-bottom: 10px + .close_occupancy + text-decoration: underline + .booking_occupancy .booking_occupancy_wrapper max-height: 250px + width: 100% overflow-x: auto + label.room_num_wrapper + text-decoration: underline + margin-bottom: 10px #booking-documents-modal - .documents-list - table - tbody - img - max-height: 55px - max-width: 55px + .documents-list table tbody img + max-width: 55px + +.toolbar_order_status_badge + font-size: 12px +.error_text + color: red +.room_type_old_price + text-decoration: line-through + color: #979797 + font-size: 12px +.wk-input-date + cursor: text + background-color: #F5F8F9 +#room_status_info_wrapper .margin-bottom-5 + margin-bottom: 5px +#room_status_info_wrapper .room_status_date + display: none + +#order_detail_view .panel .panel-heading + height: auto + padding: 5px 5px 3px 5px + a + text-transform: none +.modal-body .modal-footer + padding: 15px 0px 0px 0px +.modal-body .tab-content + padding: 15px + border: 1px solid #ddd + +.loading_overlay + display: none + position: fixed + left: 0 + top: 0 + height: 100% + width: 100% + background-color: rgba(0, 0, 0, 0.5) + z-index: 100000 + .loading-img + position: absolute + top: 50% + left: 0 + right: 0 + margin: 0 auto + +#customer_cart_details .overbooked_room + background-color: #FF69B4 + color: #FFF + padding: 2px 5px + border-radius: 2px + font-weight: 600 + +.room_status_info_form + .room_status + white-space: normal diff --git a/admin/themes/default/sass/modules/_variables.sass b/admin/themes/default/sass/modules/_variables.sass index 8289f4f1d..99b590b6d 100644 --- a/admin/themes/default/sass/modules/_variables.sass +++ b/admin/themes/default/sass/modules/_variables.sass @@ -11,7 +11,7 @@ $contrasted-lightness-threshold: 10% $bg-page-head-color : $secondary-color $bg-panel-heading-color: hsl(hue($secondary-color), 10, 90) -$badge-notif-color: $greenPrestashop +$badge-notif-color: #D27C82 $brand-addons: $pinkPrestashop $font-family-mono: 'Droid Sans Mono', Helvetica, Arial, sans-serif @@ -64,7 +64,7 @@ $sidebar-menu-hover-color: white !default $sidebar-menu-bg-hover-color: #282b30 // Toolbar -$toolbar-buttons-color: #2eacce +$toolbar-buttons-color: #00aff0 $toolbar-buttons-hover-color: #40c9ed // Scaffolding diff --git a/admin/themes/default/sass/partials/_chosen.sass b/admin/themes/default/sass/partials/_chosen.sass index 9f5f1f7e7..b56215a15 100644 --- a/admin/themes/default/sass/partials/_chosen.sass +++ b/admin/themes/default/sass/partials/_chosen.sass @@ -200,6 +200,8 @@ $chosen-sprite-path: '../img/chosen-sprite.png' input position: absolute @include left(-9000px) + &:before + visibility: hidden .chosen-container-multi .chosen-choices @@ -227,6 +229,7 @@ $chosen-sprite-path: '../img/chosen-sprite.png' border: 0 !important color: $gray height: $chosen-multi-height - 8px + width: 100% !important margin: 0 padding: 4px outline: 0 diff --git a/admin/themes/default/sass/partials/_commons.sass b/admin/themes/default/sass/partials/_commons.sass index 588ef7d53..b44f11272 100644 --- a/admin/themes/default/sass/partials/_commons.sass +++ b/admin/themes/default/sass/partials/_commons.sass @@ -215,4 +215,16 @@ padding: 8px 12px text-transform: none label - font-weight: 400 \ No newline at end of file + font-weight: 400 + +#list_filters_panel .chosen-container + width: 100% !important + +#list_filters_panel .chosen-container-multi .chosen-choices + max-height: 55px !important + white-space: nowrap + overflow-x: auto + +#list_filters_panel .chosen-container-multi .chosen-choices li + float: none + display: inline-block \ No newline at end of file diff --git a/admin/themes/default/sass/partials/_content.sass b/admin/themes/default/sass/partials/_content.sass index 2a765f62e..02f828538 100644 --- a/admin/themes/default/sass/partials/_content.sass +++ b/admin/themes/default/sass/partials/_content.sass @@ -16,7 +16,7 @@ body @include float(left) #content.bootstrap - padding: 120px 10px 0 + padding: 90px 10px 0 @include transition-property(margin) @include transition-duration(0.4s) @include transition-timing-function(ease-out) @@ -85,8 +85,8 @@ body .btn-group position: absolute white-space: nowrap - top: -2px - @include right(2px) + top: 2px + @include right(6px) a.btn float: none > a.btn @@ -109,7 +109,11 @@ body .dropdown-menu line-height: normal .panel-danger .panel-heading - background-color: $badge-notif-color!important + background-color: #DC143C + color: #FFF + margin: -20px -20px 15px -20px + padding: 0px 10px 0px 10px + form .alert clear: both @media (max-width: $screen-phone) @@ -187,6 +191,84 @@ body.display-modal margin: 15px 0 0!important height: 40px!important +//list header +.list_action_wrapper + margin-bottom: 15px + .list_availibility_container + position: relative + .dropdown-menu + right: 0 + padding: 8px 12px + label + font-weight: 400 + #selected_filter_container + background-color: #fff + padding: 8px 20px + border: solid 1px #d3d8db + border-radius: 5px 5px 0 0 + font-size: 14px + min-height: 52px + margin-top: 15px + .selected_filters > span + font-size: 12px + padding: 6px 10px + display: inline-block + background: #F5F8F9 + border: 1px solid #A0D0EB + border-radius: 3px + &+ span + margin-left: 12px + .filter_value + font-weight: 700 + i + cursor: pointer + + #list_filters_panel + margin-top: 15px + margin-bottom: 0 + #selected_filter_container + #list_filters_panel + margin-top: 0 + #selected_filter_container + div.panel + border-top: transparent + border-radius: 0 0 5px 5px + .list_filters + padding: 0 30px + display: grid + grid-template-columns: repeat(3, minmax(0, 1fr)) + gap: 8px 40px + &>.row + display: flex + align-items: center + .date_range, .input_range + display: flex + justify-content: space-between + gap: 15px + .date_range .input-group:first-child + margin-bottom: 0 + label + text-align: right + font-weight: 400 + .actions + grid-column-start: 1 + grid-column-end: 4 + @media (max-width: $screen-desktop) + .list_filters + grid-template-columns: repeat(2, 1fr) + .actions + grid-column-start: 1 + grid-column-end: 3 + + @media (max-width: $screen-tablet) + .list_filters + grid-template-columns: repeat(1, 1fr) + .actions + grid-column-start: 1 + grid-column-end: 2 + label + text-align: left + + + //help containers #main.helpOpen width: 70% diff --git a/admin/themes/default/sass/partials/_icons.sass b/admin/themes/default/sass/partials/_icons.sass index 6788aad63..2f3aa08e3 100644 --- a/admin/themes/default/sass/partials/_icons.sass +++ b/admin/themes/default/sass/partials/_icons.sass @@ -311,7 +311,7 @@ @extend .icon-cogs .icon-AdminAdmin @extend .icon-cog -.icon-AdminParentStats +.icon-AdminStats @extend .icon-bar-chart .icon-AdminStock @extend .icon-archive @@ -362,7 +362,7 @@ @extend .icon-edit .process-icon-newAttributes, .process-icon-new, .process-icon-new-url @extend .icon-plus-sign - .process-icon-modules-list + .process-icon-modules-list, .process-icon-puzzle-piece @extend .icon-puzzle-piece .process-icon-save-date @extend .icon-download diff --git a/admin/themes/default/sass/partials/_kpi.sass b/admin/themes/default/sass/partials/_kpi.sass index 3d2605967..78df786ff 100644 --- a/admin/themes/default/sass/partials/_kpi.sass +++ b/admin/themes/default/sass/partials/_kpi.sass @@ -1,14 +1,90 @@ +$kpi-rows-gap: 8px +$kpi-gap: 10px + .kpi-container - padding-bottom: 10px !important - .kpi-refresh - position: absolute - z-index: 1 - right: 20px + display: flex + justify-content: space-between + padding: 12px !important + .kpis-wrap + width: 100% + white-space: nowrap + overflow-x: auto + font-size: 0 + margin-bottom: -$kpi-rows-gap + display: flex + flex-wrap: wrap + margin-left: -($kpi-gap / 2) + margin-right: -($kpi-gap / 2) + .kpi-wrap + display: inline-block + width: 20% + margin-bottom: $kpi-rows-gap + padding-left: $kpi-gap / 2 + padding-right: $kpi-gap / 2 + .actions-wrap + width: 16px + margin-left: 16px + button + padding: 0 + border: none + opacity: 0.2 + display: block + width: 100% + &:not(:first-of-type) + margin-top: 4px + &:hover + opacity: 0.5 + background-color: #fff + &:focus, + &:active + outline: none !important + i + color: #000 !important + font-size: 16px + &.icon-ellipsis-vertical + position: relative + top: 3px + .dropdown-menu + top: 25px + right: 0 + left: unset + min-width: 200px + font-size: 13px + padding: 8px 12px + label + font-weight: normal + &.no-wrapping + .kpis-wrap + white-space: normal + flex-wrap: nowrap + .kpi-wrap + @media (min-width: $screen-lg) + min-width: 20% + @media (max-width: $screen-lg) + min-width: 20% + @media (max-width: $screen-sm) + min-width: 33.33% + @media (max-width: $screen-xs) + min-width: 50% + +@media (max-width: $screen-desktop) + &.no-wrapping + .kpis-wrap + flex-wrap: nowrap !important + +@media (max-width: $screen-lg) + .kpi-container .kpis-wrap .kpi-wrap + width: 20% +@media (max-width: $screen-sm) + .kpi-container .kpis-wrap .kpi-wrap + width: 33.33% +@media (max-width: $screen-xs) + .kpi-container .kpis-wrap .kpi-wrap + width: 50% .box-stats display: block - height: 64px - margin-bottom: 10px + height: 100% .boxchart-overlay @include padding(10px, 10px, 5px, 10px) @include margin-right(10px) @@ -16,58 +92,86 @@ @include border-radius(3px) .kpi-content width: 100% + height: 100% position: relative - @include padding-left(40px) - @include float(left) - i + border: 1px solid #e7edfa + border-left-width: 3px + border-radius: 6px + padding: 4px 8px 8px 42px + display: flex + flex-direction: column + justify-content: space-between + white-space: normal + .title-subtitle + display: flex + justify-content: space-between + .title + display: block + color: #666 + font-size: 13px + i + position: absolute + top: 5px + font-size: 15px + text-align: center + color: white + line-height: 26px + background: #eee + width: 28px + height: 28px + @include left(5px) + @include border-radius(6px) + &::before + position: absolute + top: 1px + left: 8px + .subtitle + display: block + text-transform: capitalize + color: #aaa + font-size: 10px + position: relative + top: 3px + text-align: right + .value-container + .value + display: block + clear: both + font-size: 14px + font-weight: bold + color: #666 + min-height: 22px + &.loading + height: 22px + min-width: 40px + .arrow position: absolute - top: 0 - font-size: 26px - text-align: center - color: white - line-height: 26px - @include left(0) - @include border-radius(3px) - - .title - display: block - color: #666 - .subtitle - display: block - text-transform: uppercase - color: #aaa - .value - display: block - clear: both - font-size: 1.5em - white-space: nowrap - text-overflow: ellipsis - overflow: hidden - &.loading - height: 1.2em - width: 200px + bottom: 7px + right: 9px + i + color: #828282 !important &:hover text-decoration: none .color1 + .kpi-content + border-left-color: #2BA8E3 i, .boxchart-overlay color: #2BA8E3 !important - .value - color: #2BA8E3 .color2 + .kpi-content + border-left-color: #FF5450 i, .boxchart-overlay color: #FF5450 !important - .value - color: #FF5450 .color3 + .kpi-content + border-left-color: #9E5BA1 i, .boxchart-overlay color: #9E5BA1 !important - .value - color: #9E5BA1 .color4 + .kpi-content + border-left-color: #95CC6B i, .boxchart-overlay color: #95CC6B !important - .value - color: #95CC6B .data_chart rect @@ -80,4 +184,4 @@ stroke: black .area fill: rgba(white,0.30) - stroke-width: 0 + stroke-width: 0 \ No newline at end of file diff --git a/admin/themes/default/sass/partials/_nav.sass b/admin/themes/default/sass/partials/_nav.sass index 44a54f66c..18677bed3 100644 --- a/admin/themes/default/sass/partials/_nav.sass +++ b/admin/themes/default/sass/partials/_nav.sass @@ -268,6 +268,11 @@ $min-height: 850px width: 200px @include margin-right(5px) @include float(right) + .clear_search + position: absolute + top: 6px + z-index: 10 + @include right(8px) li.maintab, li.subtab height: 28px padding: 0 diff --git a/admin/themes/default/sass/partials/_toolbar.sass b/admin/themes/default/sass/partials/_toolbar.sass index 309eb663a..01566d268 100644 --- a/admin/themes/default/sass/partials/_toolbar.sass +++ b/admin/themes/default/sass/partials/_toolbar.sass @@ -1,6 +1,6 @@ .page-head width: 100% - height: 100px + height: 78px padding: 0 margin: 0 position: fixed @@ -14,10 +14,11 @@ @include float(left) position: relative margin: 0 - font: 20pt $font-family-sans-serif + font: 14pt $font-family-sans-serif + font-weight: bold color: #363A41 white-space: nowrap - @include padding(26px, 0, 0, ($widthSidebarNav+20px)) + @include padding(31px, 0, 0, ($widthSidebarNav+20px)) @media (max-width: $screen-tablet) @include padding(26px, 0, 0, 70px) a @@ -40,6 +41,7 @@ position: absolute background-color: transparent!important @include right(0) + top: 18px @media (max-width: $screen-sm) #toolbar-nav border: none @@ -48,37 +50,54 @@ @include padding(3px, 0, 0, 0) .toolbar_btn position: relative - padding: 20px 5px !important + padding: 10px 10px !important font-size: 12px line-height: 8px - color: $main-color + color: $toolbar-buttons-color text-align: center text-shadow: none white-space: nowrap overflow: hidden text-overflow: ellipsis + border: 1px solid $toolbar-buttons-color + border-radius: 2px @include margin(0, 3px, 2px, 0) @media (max-width: $screen-desktop) width: 46px font-size: 11px + div + color: #363A41 i - color: $toolbar-buttons-color + display: inline + font-size: 18px &:hover color: $toolbar-buttons-hover-color - div - padding-top: 10px + span + position: relative + top: -2px + left: 2px + color: #363A41 + font-weight: 400 .dropdown-toolbar display: none @include float(right) @include border-radius(3px) @media (max-width: $screen-sm) display: block + padding: 6px 10px !important + margin-right: 10px + @media (max-width: $screen-xs) + margin-right: 5px + + #toolbar-nav + li + li + margin-left: 8px ul.page-breadcrumb position: absolute list-style: none margin: 0 padding: 0 - top: 4px + top: 9px height: 20px line-height: 20px color: black diff --git a/admin/themes/default/sass/partials/ndv3.sass b/admin/themes/default/sass/partials/ndv3.sass new file mode 100644 index 000000000..361d28228 --- /dev/null +++ b/admin/themes/default/sass/partials/ndv3.sass @@ -0,0 +1,29 @@ +.dashboard-chart-tooltip + background-color: #333 + padding: 0px 10px 10px 10px + color: #fff + min-width: 100px + label + display: flex + align-items: baseline + gap: 5px + font-weight: bold + padding-top: 10px + .tooltip-content + margin-top: 5px + .tooltip-content p + display: flex + align-items: baseline + gap: 5px + text-align: left + padding-left: 5px + .tooltip-data-color + display: flex + flex-direction: column + align-items: baseline + padding: 5px + max-width: 2px + .text-danger + color: #FF655C + .text-success + color: #56CE56 \ No newline at end of file diff --git a/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss b/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss index a126c3986..8240fa4ad 100644 --- a/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss +++ b/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss @@ -9,7 +9,7 @@ // Kill the scroll on the body .modal-open { - overflow: hidden; + overflow-x: hidden; } // Container that the modal scrolls within diff --git a/admin/themes/default/template/controllers/customer_threads/helpers/view/message.tpl b/admin/themes/default/template/controllers/customer_threads/helpers/view/message.tpl index cb3158f93..d006ce679 100644 --- a/admin/themes/default/template/controllers/customer_threads/helpers/view/message.tpl +++ b/admin/themes/default/template/controllers/customer_threads/helpers/view/message.tpl @@ -54,7 +54,7 @@ {/if}   - {dateFormat date=$message.date_add full=0} - {$message.date_add|substr:11:5} {if isset($message.file_name)}   {l s="Attachment"}{/if} - {if isset($message.product_name)}   {l s="Product:"} {$message.product_name|escape:'html':'UTF-8'} {/if} + {if isset($message.product_name)}   {l s="Room type:"} {$message.product_name|escape:'html':'UTF-8'} {/if}

{$message.message|escape:'html':'UTF-8'|nl2br}

diff --git a/admin/themes/default/template/controllers/information/helpers/view/view.tpl b/admin/themes/default/template/controllers/information/helpers/view/view.tpl index d142e68a6..463806b60 100644 --- a/admin/themes/default/template/controllers/information/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/information/helpers/view/view.tpl @@ -84,7 +84,7 @@ {l s='Server information'} - {if count($uname)} + {if Tools::strlen($uname) > 0}

{l s='Server information:'} {$uname|escape:'html':'UTF-8'}

diff --git a/admin/themes/default/template/controllers/modules/content.tpl b/admin/themes/default/template/controllers/modules/content.tpl index ec7610a96..bfc706ef7 100644 --- a/admin/themes/default/template/controllers/modules/content.tpl +++ b/admin/themes/default/template/controllers/modules/content.tpl @@ -36,7 +36,7 @@
- PrestaShop Addons + QloApps Addons
diff --git a/admin/themes/default/template/controllers/modules/page_header_toolbar.tpl b/admin/themes/default/template/controllers/modules/page_header_toolbar.tpl index 8396a808b..614cbfe40 100644 --- a/admin/themes/default/template/controllers/modules/page_header_toolbar.tpl +++ b/admin/themes/default/template/controllers/modules/page_header_toolbar.tpl @@ -49,7 +49,7 @@
  • -
    {l s='Update all'}
    + {l s='Update all'}
  • {/if} @@ -57,30 +57,32 @@
  • -
    {l s='Check for update'}
    + {l s='Check for update'}
  • {/if}
  • -
    {l s='Recommended Modules and Services'}
    -
    -
  • - {if $add_permission eq '1' && ($context_mode != Context::MODE_HOST)} -
  • - - -
    {l s='Add a new module'}
    -
    -
  • - {else} -
  • - - -
    {l s='Add a new module'}
    + {l s='Recommendations'}
  • + {if $add_permission eq '1'} + {if $context_mode != Context::MODE_HOST} +
  • + + + {l s='Add a new module'} + +
  • + {else} +
  • + + + {l s='Add a new module'} + +
  • + {/if} {/if} {if isset($help_link)} {*
  • diff --git a/admin/themes/default/template/controllers/modules_catalog/page.tpl b/admin/themes/default/template/controllers/modules_catalog/page.tpl index fcdd22e60..7ed4b5485 100644 --- a/admin/themes/default/template/controllers/modules_catalog/page.tpl +++ b/admin/themes/default/template/controllers/modules_catalog/page.tpl @@ -109,7 +109,7 @@
  • - {l s='Explore all themes of Qloapps'}  + {l s='Explore all themes of QloApps'}  {l s='QloApps Themes'}
    {/if} diff --git a/admin/themes/default/template/controllers/normal_products/helpers/form/form.tpl b/admin/themes/default/template/controllers/normal_products/helpers/form/form.tpl index 7b70d1c05..3fe9645bf 100644 --- a/admin/themes/default/template/controllers/normal_products/helpers/form/form.tpl +++ b/admin/themes/default/template/controllers/normal_products/helpers/form/form.tpl @@ -82,6 +82,9 @@ var with_room_type = {Product::SERVICE_PRODUCT_WITH_ROOMTYPE|intval}; var without_room_type = {Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE|intval}; + var price_addition_type_with_room = {Product::PRICE_ADDITION_TYPE_WITH_ROOM|intval}; + var price_addition_type_independent = {Product::PRICE_ADDITION_TYPE_INDEPENDENT|intval}; + var has_combinations = {$has_combinations|intval}; diff --git a/admin/themes/default/template/controllers/normal_products/helpers/list/list_header.tpl b/admin/themes/default/template/controllers/normal_products/helpers/list/list_header.tpl deleted file mode 100644 index 27872f854..000000000 --- a/admin/themes/default/template/controllers/normal_products/helpers/list/list_header.tpl +++ /dev/null @@ -1,36 +0,0 @@ -{* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - -{extends file="helpers/list/list_header.tpl"} - -{block name=leadin} - {if isset($category_tree)} -
    -
    - {$category_tree} -
    -
    - {/if} -{/block} diff --git a/admin/themes/default/template/controllers/normal_products/informations.tpl b/admin/themes/default/template/controllers/normal_products/informations.tpl index acc85a424..49537d7dd 100644 --- a/admin/themes/default/template/controllers/normal_products/informations.tpl +++ b/admin/themes/default/template/controllers/normal_products/informations.tpl @@ -391,7 +391,7 @@ -
    available_for_order && $product->isAssociatedToShop()) || $product->auto_add_to_cart}style="display:none;"{/if}> +
    auto_add_to_cart && $product->isAssociatedToShop()}style="display:none;"{/if}>
    -
    available_for_order && $product->isAssociatedToShop()) || $product->auto_add_to_cart || !$product->allow_multiple_quantity}style="display:none;"{/if}> +
    auto_add_to_cart && $product->isAssociatedToShop()) || !$product->allow_multiple_quantity}style="display:none;"{/if}>
    diff --git a/admin/themes/default/template/controllers/orders/_overbookings.tpl b/admin/themes/default/template/controllers/orders/_overbookings.tpl new file mode 100644 index 000000000..b2b89fa6c --- /dev/null +++ b/admin/themes/default/template/controllers/orders/_overbookings.tpl @@ -0,0 +1,93 @@ +{* +* 2010-2023 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright 2010-2023 Webkul IN +* @license https://store.webkul.com/license.html +*} + +{if isset($orderOverBookings) && $orderOverBookings} +
    +
    + {l s='Overbookings found in this order !!'} +
    +
    +
    + + + + + + + + + + + {foreach from=$orderOverBookings item=data} + {if !$data.is_refunded} + + + + + + + + + + {/if} + {/foreach} +
    {l s='Room No.'}{l s='Room type.'}{l s='Duration'}{l s='Occupancy'}{l s='Confirmed booking order'}{l s='Reallocate/Swap'}{l s='Resolve'}
    {$data['room_num']}{$data['room_type_name']}{dateFormat date=$data['date_from']} {l s='To'} {dateFormat date=$data['date_to']} + {if $order->with_occupancy && $data['children']} + + {else} + {if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} + {/if} + + {if isset($data['booked_room_info']['id_order']) && $data['booked_room_info']['id_order']} + #{$data['booked_room_info']['id_order']} + {else} + {l s='N/A'} + {/if} + + {l s='Reallocate/Swap Room'} + + {if isset($data['booked_room_info']) && $data['booked_room_info']} + {l s='Already booked'} + {else} + {l s='Resolve'} + {/if} +
    +
    + +
    +

    - {l s='You can resolve room overbooking with \'Resolve\' column only when the overbooked room is now free for booked duration.'}

    +

    - {l s='You can also reallocate an overbooked room with an available room to resolve room\'s overbooking.'}

    +
    +
    +
    +{/if} \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/_print_pdf_icon.tpl b/admin/themes/default/template/controllers/orders/_print_pdf_icon.tpl index 12c515d78..55ad2a64b 100644 --- a/admin/themes/default/template/controllers/orders/_print_pdf_icon.tpl +++ b/admin/themes/default/template/controllers/orders/_print_pdf_icon.tpl @@ -32,10 +32,10 @@ {/if} {* Generate HTML code for printing Delivery Icon with link *} - {if $order->delivery_number} + {* {if $order->delivery_number} - {/if} + {/if} *} diff --git a/admin/themes/default/template/controllers/orders/_product_line.tpl b/admin/themes/default/template/controllers/orders/_product_line.tpl index e68b185df..6247eb54e 100644 --- a/admin/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin/themes/default/template/controllers/orders/_product_line.tpl @@ -23,37 +23,18 @@ * International Registered Trademark & Property of PrestaShop SA *} - - {if $refund_allowed} - - - - {/if} - - {$data.room_num} - - - - - -

    {$data.room_type}

    - {*

    - - {l s='Extra Services'} - -

    *} - {* {if (isset($data['extra_demands']) && $data['extra_demands']) || (isset($data['additional_services']) && $data['additional_services'])} -

    - {convertPriceWithCurrency price=($data['extra_demands_price_ti'] + $data['additional_services_price_ti']) currency=$currency->id} -

    - {/if} *} - - - - {$data['hotel_name']} - - - + + +

    {$data.room_num}

    + {if $data.is_back_order} + {l s='overbooked'} + {/if} + + + +

    {$data.room_type}

    + + {dateFormat date=$data.date_from} - {dateFormat date=$data.date_to} {if $can_edit} @@ -62,7 +43,7 @@
    {l s='Check In'}
    - +
    @@ -70,7 +51,7 @@
    {l s='Check Out'}
    - +
    @@ -78,12 +59,12 @@
    {/if} - - {if $order->with_occupancy && $data['children']} + + {if $data['children']} +
    + {* Traveller information *} + {if $customerGuestDetail} +
    +
    +  {l s='Traveller detail'} + {if $can_edit} + + {/if} +
    +
    +
    +
    + +
    {$customerGuestDetail->gender->name}
    +
    +
    + +
    {$customerGuestDetail->firstname} {$customerGuestDetail->lastname}
    +
    +
    + +
    {$customerGuestDetail->email}
    +
    +
    + +
    {$customerGuestDetail->phone}
    +
    +
    +
    +
    + {/if} - - - - -
    -
    - -
    - - - - {/if} - {/foreach} - {else} - - {l s='No data found.'} - - {/if} - - - - - - - -
    - - - - - - {if is_array($returns) && count($returns)} -
    -
    - {l s='Refunds'} -
    - - - - - - - - - - - {foreach from=$returns item=return_info} - - - - - - - {/foreach} - -
    {l s='Request ID'}{l s='Total Rooms'}{l s='Status'}{l s='Requested Date'}
    - #{$return_info.id_order_return} - - {$return_info.total_rooms|escape:'html':'UTF-8'} - - {capture name=refund_status} - {if isset($return_info.payment_mode) && $return_info.payment_mode != ''}{l s='Payment Mode: '}{$return_info.payment_mode}
    {/if} - {if isset($return_info.id_transaction) && $return_info.id_transaction != ''}{l s='Transaction ID: '}{$return_info.id_transaction}
    {/if} - {if isset($return_info.id_return_type) && isset($return_info.return_type) && $return_info.id_return_type && $return_info.return_type} - {if $return_info.return_type == OrderReturn::RETURN_TYPE_CART_RULE} - {l s='Voucher ID: '} - - #{$return_info.id_return_type} - - {elseif $return_info.return_type == OrderReturn::RETURN_TYPE_ORDER_SLIP} - {l s='Credit Slip ID: '} - #{$return_info.id_return_type} - - {l s='Download' mod='hotelreservationsystem'} - - {/if} -
    - {/if} - {if isset($return_info.id_cart_rule) && $return_info.id_cart_rule} - {l s='Voucher ID: '} - - #{$return_info.id_cart_rule} - -
    - {/if} - {/capture} +
    +
    +  {l s='Refund Requests'} +
    +
    + {if is_array($returns) && count($returns)} +
    + + + + + + + + + + + {foreach from=$returns item=return_info} + + + + + + + {/foreach} + +
    {l s='Request ID'}{l s='Total Rooms'}{l s='Requested Date'}{l s='Status'}
    + #{$return_info.id_order_return} + + {$return_info.total_rooms|escape:'html':'UTF-8'} + + {$return_info.date_add} + + {$return_info.state_name} + {if $return_info.refunded_amount > 0} +  {displayPrice price=$return_info.refunded_amount currency=$currency->id} + {/if} +
    +
    + {else} +
    +
    + + {l s='No refund requests created.'} +
    +
    + {/if} +
    +
    +
    +
    +  {l s='Cancellation Policies'} +
    +
    + {if is_array($applicable_refund_policies) && count($applicable_refund_policies)} + + {else} +
    +
    + + {l s='No cancellation policies applicable.'} +
    +
    + {/if} +
    +
    + {hook h="displayAdminOrderRight" id_order=$order->id} + + + {hook h="displayAdminOrder" id_order=$order->id} +
    +
    +
    + +
    + +
    +
    +
    +  {l s='Rooms Booking Detail'} {$order_detail_data|@count} + {if !$order->hasBeenDelivered()} + + {/if} +
    + {* by webkul this code is added for showing rooms information on the order detail page *} + {include file='controllers/orders/_rooms_informaion_table.tpl'} +
    + {include file='controllers/orders/_service_products_table.tpl'} - {if $smarty.capture.refund_status|trim != ''} - {$smarty.capture.refund_status} - {else} - {$return_info.state_name} - {/if} -
    - {$return_info.date_add} -
    -
    - {/if} -
    -
    - {l s='Cancellation Policies'} -
    - {if is_array($applicable_refund_policies) && count($applicable_refund_policies)} - - {else} -

    - - {l s='No cancellation policies applicable.'} -

    - {/if} -
    - {hook h="displayAdminOrderRight" id_order=$order->id} - - - {hook h="displayAdminOrder" id_order=$order->id} -
    -
    - - -
    - -
    + {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + + {else} + + {/if} +
    + +
    + -
    -
    - - {l s='Order Detail'} {$order_detail_data|@count} - {* by webkul products changes as rooms *} -
    - {* by webkul this code is added for showing rooms information on the order detail page *} - {include file='controllers/orders/_rooms_informaion_table.tpl'} -
    - {include file='controllers/orders/_service_products_table.tpl'} +
    +
    +
    +
    + + {* Assign order price *} + {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + {assign var=order_product_price value=($order->total_products)} + {assign var=order_discount_price value=$order->total_discounts_tax_excl} + {assign var=order_wrapping_price value=$order->total_wrapping_tax_excl} + {assign var=order_shipping_price value=$order->total_shipping_tax_excl} + {else} + {assign var=order_product_price value=$order->total_products_wt} + {assign var=order_discount_price value=$order->total_discounts_tax_incl} + {assign var=order_wrapping_price value=$order->total_wrapping_tax_incl} + {assign var=order_shipping_price value=$order->total_shipping_tax_incl} + {/if} + {assign var=room_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, true)} + {assign var=room_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)} + {assign var=service_products_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE)} + {assign var=service_products_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE)} + {assign var=additional_service_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTE)} + {assign var=additional_service_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTI)} + {if $room_price_tax_excl} + + + + + + {/if} + {if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0} + + + + + + {/if} + {* {if $room_price_tax_excl} + + + + + + {/if} + {if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0} + + + + + + {/if} *} + {if $service_products_price_tax_excl} + + + + + + {/if} - {capture "TaxMethod"} - {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} - {l s='tax excluded.'} - {else} - {l s='tax included.'} - {/if} - {/capture} - {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} - - {else} - - {/if} - {if $can_edit} - -
    - {if !$order->hasBeenDelivered()} - {* *} - - {/if} - +
    total_discounts_tax_incl == 0}style="display: none;"{/if}> + + + + + total_wrapping_tax_incl == 0}style="display: none;"{/if}> + + + + + {if isset($totalConvenienceFeeTI) && $totalConvenienceFeeTI > 0} + + + + + + {/if} + {* {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} *} + + + + + + {* {/if} *} + + + + + - {if $refund_allowed && !$hasCompletelyRefunded} -
    - - -
    - {/if} - - {/if} -
     
    -
    -
    -
    - {l s='For this customer group, prices are displayed as: [1]%s[/1]' sprintf=[$smarty.capture.TaxMethod] tags=['']} - {if !$refund_allowed} -
    {l s='Refunds are disabled'} - {/if} -
    -
    -
    -
    - {if (sizeof($discounts) || $can_edit)} -
    -
    {l s='Total Rooms Cost (tax excl.)'} + {displayPrice price=$room_price_tax_excl currency=$currency->id} +
    {l s='Total Extra services (tax excl.)'} + {displayPrice price=($additional_service_price_tax_excl - $totalConvenienceFeeTE) currency=$currency->id} +
    {l s='Total Rooms Tax'} + {displayPrice price=($room_price_tax_incl - $room_price_tax_excl) currency=$currency->id} +
    {l s='Extra services Tax'} + {displayPrice price=($additional_service_price_tax_incl - $additional_service_price_tax_excl) currency=$currency->id} +
    {l s='Total service products cost (tax excl.)'} + {displayPrice price=$service_products_price_tax_excl currency=$currency->id} +
    {l s='Discounts'} + -{displayPrice price=$order_discount_price currency=$currency->id} +
    {l s='Wrapping'} + {displayPrice price=$order_wrapping_price currency=$currency->id} +
    {l s='Convenience Fee'} + {displayPrice price=$totalConvenienceFeeTE currency=$currency->id} +
    {l s='Total Taxes'} + {displayPrice price=($order->total_paid_tax_incl - $order->total_paid_tax_excl) currency=$currency->id} +
    {l s='Final Booking Total'} + {displayPrice price=$order->total_paid_tax_incl currency=$currency->id} +
    - - - - - {if $can_edit} - - {/if} - - - - {foreach from=$discounts item=discount} - - - - {if $can_edit} - - {/if} - - {/foreach} - -
    - - {l s='Discount name'} - - - - {l s='Value'} - -
    {$discount['name']} - {if $discount['value'] != 0.00} - - - {/if} - {displayPrice price=$discount['value'] currency=$currency->id} - - - - {l s='Delete voucher'} - -
    -
    - - {/if} -
    -
    -
    - - {* Assign order price *} - {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} - {assign var=order_product_price value=($order->total_products)} - {assign var=order_discount_price value=$order->total_discounts_tax_excl} - {assign var=order_wrapping_price value=$order->total_wrapping_tax_excl} - {assign var=order_shipping_price value=$order->total_shipping_tax_excl} - {else} - {assign var=order_product_price value=$order->total_products_wt} - {assign var=order_discount_price value=$order->total_discounts_tax_incl} - {assign var=order_wrapping_price value=$order->total_wrapping_tax_incl} - {assign var=order_shipping_price value=$order->total_shipping_tax_incl} - {/if} + {if isset($refundReqBookings) && $refundReqBookings} + + + + + + {/if} - {assign var=room_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, true)} - {assign var=room_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)} - {assign var=service_products_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE)} - {assign var=service_products_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE)} - {assign var=additional_service_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTE)} - {assign var=additional_service_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTI)} - {if $room_price_tax_excl} - - - - - - {/if} - {if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0} - - - - - - {/if} - {* {if $room_price_tax_excl} - - - - - - {/if} - {if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0} - - - - - - {/if} *} - {if $service_products_price_tax_excl} - - - - - - {/if} + + + + +
    * {l s='Refunded Amount'} + {displayPrice price=$refundedAmount currency=$currency->id} +
    {l s='Total Rooms Cost (tax excl.)'} - {displayPrice price=$room_price_tax_excl currency=$currency->id} -
    {l s='Total Extra services (tax excl.)'} - {displayPrice price=($additional_service_price_tax_excl - $totalConvenienceFeeTE) currency=$currency->id} -
    {l s='Total Rooms Tax'} - {displayPrice price=($room_price_tax_incl - $room_price_tax_excl) currency=$currency->id} -
    {l s='Extra services Tax'} - {displayPrice price=($additional_service_price_tax_incl - $additional_service_price_tax_excl) currency=$currency->id} -
    {l s='Total service products cost (tax excl.)'} - {displayPrice price=$service_products_price_tax_excl currency=$currency->id} -
    {l s='Due Amount'} + + {displayPrice currency=$order->id_currency price=($order->total_paid_tax_incl - $order->total_paid_real)} + +
    +
    +
    +
    - total_discounts_tax_incl == 0}style="display: none;"{/if}> - {l s='Discounts'} - - -{displayPrice price=$order_discount_price currency=$currency->id} - - - - total_wrapping_tax_incl == 0}style="display: none;"{/if}> - {l s='Wrapping'} - - {displayPrice price=$order_wrapping_price currency=$currency->id} - - - - {if isset($totalConvenienceFeeTI) && $totalConvenienceFeeTI > 0} - - {l s='Convenience Fee'} - - {displayPrice price=$totalConvenienceFeeTE currency=$currency->id} - - - - {/if} - {* {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} *} - - {l s='Total Taxes'} - {displayPrice price=($order->total_paid_tax_incl - $order->total_paid_tax_excl) currency=$currency->id} - - - {* {/if} *} - - {l s='Final Booking Total'} - - {displayPrice price=$order->total_paid_tax_incl currency=$currency->id} - - - + {* Discount block *} +
    +
    +
    +  {l s='Voucher'} + {if $can_edit} + + {/if} +
    +
    + {if sizeof($discounts)} +
    + + + + + + {if $can_edit} + + {/if} + + + + {foreach from=$discounts item=discount} + + + + {if $can_edit} + + {/if} + + {/foreach} + +
    + {l s='Voucher name'} + + {l s='Value'} + + {l s='Delete'} +
    {$discount['name']} + {if $discount['value'] != 0.00} + - + {/if} + {displayPrice price=$discount['value'] currency=$currency->id} + + +
    +
    + {else} +
    +
    + + {l s='No vouchers created.'} +
    +
    + {/if} +
    +
    +
    - {if isset($refundReqBookings) && $refundReqBookings} - - * {l s='Refunded Amount'} - - {displayPrice price=$refundedAmount currency=$currency->id} - - - - {/if} + + {if count($order->getBrother()) > 0} +
    +
    +
    +  {l s='Linked orders'} +
    +
    +
    + + + + + + + + + + + {foreach $order->getBrother() as $brother_order} + + + + + + + {/foreach} + +
    + {l s='Order no. '} + + {l s='Status'} + + {l s='Amount'} +
    + #{$brother_order->id} + + {$brother_order->getCurrentOrderState()->name[$current_id_lang]} + + {displayPrice price=$brother_order->total_paid_tax_incl currency=$currency->id} + + + + {l s='See the order'} + +
    +
    +
    +
    +
    + {/if} - {if $order->total_paid_tax_incl > $order->total_paid_real} - - {l s='Due Amount'} - - - {displayPrice currency=$order->id_currency price=($order->total_paid_tax_incl - $order->total_paid_real)} - - - - {/if} - -
    -
    - - - - - - +
    +
    +
    +  {l s='Messages'} {sizeof($customer_thread_message)} + {l s='Show all messages'} +
    +
    +
    +
    +
    + +

    + +

    + +
    -
    -
    - - {if (sizeof($sources))} -
    -
    - - {l s='Sources'} {$sources|@count} -
    - -
    - {/if} +
    + + +
    - - {if count($order->getBrother()) > 0} -
    -
    - - {l s='Linked orders'} -
    -
    - - - - - - - - - - - {foreach $order->getBrother() as $brother_order} - - - - - - - {/foreach} - -
    - {l s='Order no. '} - - {l s='Status'} - - {l s='Amount'} -
    - #{$brother_order->id} - - {$brother_order->getCurrentOrderState()->name[$current_id_lang]} - - {displayPrice price=$brother_order->total_paid_tax_incl currency=$currency->id} - - - - {l s='See the order'} - -
    -
    -
    - {/if} -
    -
    +
    +

    + +

    +
    + + - - +
    + + + {if (sizeof($sources))} +
    +
    +
    +  {l s='Sources'} {$sources|@count} +
    + +
    +
    + {/if} +
    -
    - -{* MOdal for extra demands *} - - -{* Apply css for the page *} - - - -{strip} - {addJsDefL name=no_rm_avail_txt}{l s='No rooms available.' js=1}{/addJsDefL} - {addJsDefL name=slct_rm_err}{l s='Please select a room first.' js=1}{/addJsDefL} - {addJsDefL name=txtExtraDemandSucc}{l s='Updated Successfully' js=1}{/addJsDefL} - {addJsDefL name=atleastSelectTxt}{l s='Select at least one facility to update.' js=1}{/addJsDefL} - - {addJsDefL name=txtSomeErr}{l s='Some error occurred. Please try again.' js=1}{/addJsDefL} - {addJsDefL name=txtDeleteSucc}{l s='Deleted successfully' js=1}{/addJsDefL} - {addJsDefL name=txtInvalidDemandVal}{l s='Invalid demand value found' js=1}{/addJsDefL} - {addJsDefL name='select_age_txt'}{l s='Select age' js=1}{/addJsDefL} - {addJsDefL name='under_1_age'}{l s='Under 1' js=1}{/addJsDefL} - {addJsDefL name='room_txt'}{l s='Room' js=1}{/addJsDefL} - {addJsDefL name='rooms_txt'}{l s='Rooms' js=1}{/addJsDefL} - {addJsDefL name='remove_txt'}{l s='Remove' js=1}{/addJsDefL} - {addJsDefL name='adult_txt'}{l s='Adult' js=1}{/addJsDefL} - {addJsDefL name='adults_txt'}{l s='Adults' js=1}{/addJsDefL} - {addJsDefL name='child_txt'}{l s='Child' js=1}{/addJsDefL} - {addJsDefL name='children_txt'}{l s='Children' js=1}{/addJsDefL} - {addJsDefL name='below_txt'}{l s='Below' js=1}{/addJsDefL} - {addJsDefL name='years_txt'}{l s='years' js=1}{/addJsDefL} - {addJsDefL name='all_children_txt'}{l s='All Children' js=1}{/addJsDefL} - {addJsDefL name='invalid_occupancy_txt'}{l s='Invalid occupancy(adults/children) found.' js=1}{/addJsDefL} - {addJsDef max_child_age=$max_child_age|escape:'quotes':'UTF-8'} - {addJsDef max_child_in_room=$max_child_in_room|escape:'quotes':'UTF-8'} -{/strip} - -{* Apply javascript for the page *} - + {addJsDefL name=txtSomeErr}{l s='Some error occurred. Please try again.' js=1}{/addJsDefL} + {addJsDefL name=txtDeleteSucc}{l s='Deleted successfully' js=1}{/addJsDefL} + {addJsDefL name=txtInvalidDemandVal}{l s='Invalid demand value found' js=1}{/addJsDefL} + {addJsDefL name='select_age_txt'}{l s='Select age' js=1}{/addJsDefL} + {addJsDefL name='under_1_age'}{l s='Under 1' js=1}{/addJsDefL} + {addJsDefL name='room_txt'}{l s='Room' js=1}{/addJsDefL} + {addJsDefL name='rooms_txt'}{l s='Rooms' js=1}{/addJsDefL} + {addJsDefL name='remove_txt'}{l s='Remove' js=1}{/addJsDefL} + {addJsDefL name='adult_txt'}{l s='Adult' js=1}{/addJsDefL} + {addJsDefL name='adults_txt'}{l s='Adults' js=1}{/addJsDefL} + {addJsDefL name='child_txt'}{l s='Child' js=1}{/addJsDefL} + {addJsDefL name='children_txt'}{l s='Children' js=1}{/addJsDefL} + {addJsDefL name='below_txt'}{l s='Below' js=1}{/addJsDefL} + {addJsDefL name='years_txt'}{l s='years' js=1}{/addJsDefL} + {addJsDefL name='all_children_txt'}{l s='All Children' js=1}{/addJsDefL} + {addJsDefL name='max_occupancy_reached_txt'}{l s='Maximum room occupancy reached' js=1}{/addJsDefL} + {addJsDefL name='max_adults_txt'}{l s='Maximum adult occupancy reached' js=1}{/addJsDefL} + {addJsDefL name='max_children_txt'}{l s='Maximum children occupancy reached' js=1}{/addJsDefL} + {addJsDefL name='no_children_allowed_txt'}{l s='Only adults can be accommodated' js=1}{/addJsDefL} + {addJsDefL name='invalid_occupancy_txt'}{l s='Invalid occupancy(adults/children) found.' js=1}{/addJsDefL} + {addJsDefL name='select_room_txt'}{l s='Select room' js=1}{/addJsDefL} + {addJsDef max_child_age=$max_child_age|escape:'quotes':'UTF-8'} + {addJsDef max_child_in_room=$max_child_in_room|escape:'quotes':'UTF-8'} + {addJsDef ROOM_STATUS_ALLOTED=$ROOM_STATUS_ALLOTED|escape:'quotes':'UTF-8'} + {addJsDef ROOM_STATUS_CHECKED_IN=$ROOM_STATUS_CHECKED_IN|escape:'quotes':'UTF-8'} + {addJsDef ROOM_STATUS_CHECKED_OUT=$ROOM_STATUS_CHECKED_OUT|escape:'quotes':'UTF-8'} + {addJsDefL name=txt_booking_document_upload_success}{l s='Document uploaded successfully.' js=1}{/addJsDefL} + {addJsDefL name=txt_booking_document_delete_confirm}{l s='Are you sure?' js=1}{/addJsDefL} + {addJsDefL name=txt_booking_document_delete_success}{l s='Document deleted successfully.' js=1}{/addJsDefL} + {/strip} {/block} \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/modals/_add_room_booking.tpl b/admin/themes/default/template/controllers/orders/modals/_add_room_booking.tpl new file mode 100644 index 000000000..63d96c205 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_add_room_booking.tpl @@ -0,0 +1,152 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_booking_documents.tpl b/admin/themes/default/template/controllers/orders/modals/_booking_documents.tpl new file mode 100644 index 000000000..930c61a38 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_booking_documents.tpl @@ -0,0 +1,86 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_cancel_room_bookings.tpl b/admin/themes/default/template/controllers/orders/modals/_cancel_room_bookings.tpl new file mode 100644 index 000000000..f2d0875b7 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_cancel_room_bookings.tpl @@ -0,0 +1,78 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_discount_form.tpl b/admin/themes/default/template/controllers/orders/modals/_discount_form.tpl new file mode 100644 index 000000000..32838a5e1 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_discount_form.tpl @@ -0,0 +1,92 @@ +{* +* 2007-2017 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2017 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_document_note.tpl b/admin/themes/default/template/controllers/orders/modals/_document_note.tpl new file mode 100644 index 000000000..ecb8e98e5 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_document_note.tpl @@ -0,0 +1,35 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_edit_room_booking.tpl b/admin/themes/default/template/controllers/orders/modals/_edit_room_booking.tpl new file mode 100644 index 000000000..edd3d40d8 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_edit_room_booking.tpl @@ -0,0 +1,47 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl new file mode 100644 index 000000000..444182bab --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl @@ -0,0 +1,128 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + +
    + + + + + + + + + + +
    +
    +
    + +
    + + +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + +
    +
    + +
    + {if $currency->format % 2}
    {$currency->sign}
    {/if} + + {if !($currency->format % 2)}
    {$currency->sign}
    {/if} +
    +
    +
    + + {if $order->with_occupancy} +
    + +
    + {else} + + {/if} +
    +
    +
    + +
    \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services.tpl new file mode 100644 index 000000000..98d72ddec --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services.tpl @@ -0,0 +1,34 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl new file mode 100644 index 000000000..1231752ca --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl @@ -0,0 +1,174 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + +
    + + {if isset($orderEdit) && $orderEdit} +

    + + +

    + + {* Already selected room demands *} +
    + + + + + + + + + + + {if isset($extraDemands) && $extraDemands} + {foreach $extraDemands as $roomDemand} + {foreach $roomDemand['extra_demands'] as $demand} + + + + + + + {/foreach} + {/foreach} + {else} + + + + {/if} + +
    {l s='Name'}{l s='Unit Price'}{l s='Total Price'}{l s='Action'}
    {$demand['name']} +
    + {$currencySign} + + {if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY} + {l s='/ night'} + {/if} +
    +
    {displayPrice price=$demand['total_price_tax_excl'] currency=$orderCurrency}
    + {l s='No facilities added yet.'} +
    +
    + + {* Room demands available for the current editing room*} +
    +
    + {if isset($roomTypeDemands) && $roomTypeDemands} + + + + + + + + + + + {foreach $roomTypeDemands as $idGlobalDemand => $demand} + + + + + + + {/foreach} + +
    {l s='Name'}{l s='Option'}{l s='Unit Price'}
    + + + {$demand['name']|escape:'html':'UTF-8'} + + {if isset($demand['adv_option']) && $demand['adv_option']} + + {else} + {l s='--'} + + {/if} + +
    + {$currencySign} + {if isset($selected_adv_option) && isset($demand['adv_option'][$selected_adv_option]['price_tax_excl'])} + {assign var=demand_price value=$demand['adv_option'][$selected_adv_option]['price_tax_excl']} + {else if isset($demand['adv_option']) && $demand['adv_option']} + {assign var=demand_price value=$demand['adv_option'][$demand['adv_option']|@key]['price_tax_excl']} + {else} + {assign var=demand_price value=$demand['price_tax_excl']} + {/if} + + {if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY} + {l s='/ night'} + {/if} +
    +
    + + + {else} + {l s='No facilities available for this room.'} + {/if} +
    +
    + {else} +
    + + + + + + + + + + {if isset($extraDemands) && $extraDemands} + {foreach $extraDemands as $roomDemand} + {foreach $roomDemand['extra_demands'] as $demand} + + + + + + {/foreach} + {/foreach} + {else} + + + + {/if} + +
    {l s='Name'}{l s='Unit Price'}{l s='Total Price'}
    {$demand['name']} + {displayPrice price=$demand['unit_price_tax_excl'] currency=$orderCurrency} + {if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY} + {l s='/ night'} + {/if} + {displayPrice price=$demand['total_price_tax_excl'] currency=$orderCurrency}
    + {l s='No facilities added yet.'} +
    +
    + {/if} +
    \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/_room_services_block.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl similarity index 70% rename from admin/themes/default/template/controllers/orders/_room_services_block.tpl rename to admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl index c0b3ef515..67412d3fc 100644 --- a/admin/themes/default/template/controllers/orders/_room_services_block.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl @@ -1,5 +1,5 @@ {* -* 2010-2023 Webkul. +* Since 2010 Webkul. * * NOTICE OF LICENSE * @@ -13,11 +13,11 @@ * needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. * * @author Webkul IN -* @copyright 2010-2023 Webkul IN +* @copyright Since 2010 Webkul IN * @license https://store.webkul.com/license.html *} -
    +
    {if isset($orderEdit) && $orderEdit}

    @@ -27,12 +27,12 @@ {* Already selected room services *}

    - +
    - - + + @@ -41,11 +41,11 @@ {if isset($additionalServices) && $additionalServices} {foreach $additionalServices['additional_services'] as $service} - + - - - + {/foreach} {else} @@ -90,9 +99,9 @@ - - - + + + @@ -112,7 +121,7 @@ {l s='Convenience fee'} {/if} - {/foreach}
    {l s='Name'}{l s='Quantity'}{l s='Quantity'} {l s='Unit Price'} {l s='Total Price'} {l s='Action'}
    {$service['name']|escape:'html':'UTF-8'}
    + {if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM} {l s='Auto added'}
    {/if} @@ -53,23 +53,32 @@ {l s='Convenience fee'} {/if}
    + {if $service['allow_multiple_quantity']}
    - + +

    + {l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']} +

    {else} -- {/if}
    - {displayPrice price=$service['unit_price_tax_excl'] currency=$orderCurrency} - {if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY} +
    + {$currencySign} + + {if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.product_price_calculation_method} + {l s='/ night'} + {/if} +
    + {* {if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY} {l s='/ night'} - {/if} + {/if} *}
    {displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency}
    {l s='Name'}{l s='Quantity'}{l s='Price'} {l s='Quantity'}{l s='Unit Price'}
    + {if $product['allow_multiple_quantity']}
    @@ -122,21 +131,27 @@ {/if}
    - {convertPrice price=$product['price_tax_exc']} - {if $product['price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY} - {l s='/ night'} - {/if} +
    + {$currencySign} + + {if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['price_calculation_method']} + {l s='/ night'} + {/if} +
    + + {else} {l s='No services available to add to this room.'} {/if}
    - {elseif isset($additionalServices) && $additionalServices} @@ -147,7 +162,7 @@ {l s='Name'} {l s='Unit Price'} - {l s='Total Price'} + {l s='Total Price'} @@ -157,7 +172,7 @@ {$service['id_product']|escape:'html':'UTF-8'} {$service['name']|escape:'html':'UTF-8'} - + {if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT} {l s='Convenience fee'} {/if} @@ -171,7 +186,7 @@ {l s='/ night'} {/if} - + {displayPrice price=$service['total_price_tax_excl'] currency=$orderCurrency} diff --git a/admin/themes/default/template/controllers/orders/modals/_order_payment_detail.tpl b/admin/themes/default/template/controllers/orders/modals/_order_payment_detail.tpl new file mode 100644 index 000000000..e5ff66458 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_order_payment_detail.tpl @@ -0,0 +1,77 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_order_payment_form.tpl b/admin/themes/default/template/controllers/orders/modals/_order_payment_form.tpl new file mode 100644 index 000000000..adbcf0c32 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_order_payment_form.tpl @@ -0,0 +1,94 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_partials/_room_extra_services_content.tpl b/admin/themes/default/template/controllers/orders/modals/_partials/_room_extra_services_content.tpl new file mode 100644 index 000000000..7221bd378 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_partials/_room_extra_services_content.tpl @@ -0,0 +1,35 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + +{include file='controllers/orders/modals/_extra_services_facilities_tab_content.tpl'} +{include file='controllers/orders/modals/_extra_services_service_products_tab_content.tpl'} + +{* Css for handling extra demands changes *} + + diff --git a/admin/themes/default/template/controllers/normal_products/helpers/list/index.php b/admin/themes/default/template/controllers/orders/modals/_partials/index.php similarity index 96% rename from admin/themes/default/template/controllers/normal_products/helpers/list/index.php rename to admin/themes/default/template/controllers/orders/modals/_partials/index.php index 2cba03ab6..6174dac6d 100644 --- a/admin/themes/default/template/controllers/normal_products/helpers/list/index.php +++ b/admin/themes/default/template/controllers/orders/modals/_partials/index.php @@ -31,5 +31,5 @@ header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); -header('Location: ../../../../../../../../'); +header('Location: ../../../../../../'); exit; diff --git a/admin/themes/default/template/controllers/orders/modals/_room_reallocation.tpl b/admin/themes/default/template/controllers/orders/modals/_room_reallocation.tpl new file mode 100644 index 000000000..3f2e32f8c --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_room_reallocation.tpl @@ -0,0 +1,134 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_room_status_form.tpl b/admin/themes/default/template/controllers/orders/modals/_room_status_form.tpl new file mode 100644 index 000000000..42b0a6645 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_room_status_form.tpl @@ -0,0 +1,54 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/_traveller_form.tpl b/admin/themes/default/template/controllers/orders/modals/_traveller_form.tpl new file mode 100644 index 000000000..103f7bf85 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_traveller_form.tpl @@ -0,0 +1,57 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/admin/themes/default/template/controllers/orders/modals/index.php b/admin/themes/default/template/controllers/orders/modals/index.php new file mode 100644 index 000000000..9f627334f --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/index.php @@ -0,0 +1,29 @@ + +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; diff --git a/admin/themes/default/template/controllers/products/additionalfacilities.tpl b/admin/themes/default/template/controllers/products/additionalfacilities.tpl index 1296aa87e..c3a58eb34 100644 --- a/admin/themes/default/template/controllers/products/additionalfacilities.tpl +++ b/admin/themes/default/template/controllers/products/additionalfacilities.tpl @@ -24,7 +24,7 @@ {l s='Room Type Additional Facilities'}
    - {l s='To create new Additional facilities'} {l s='click here.'} + {l s='To create new additional facilities please visit'} {l s='Additional facilities'} {l s='page.'}
    {if isset($allDemands) && $allDemands} @@ -148,10 +148,6 @@ {l s='Save and stay'}
    - {else} -
    - {l s='No additional facilities created yet. To create please visit'} {l s='Additional facilities'} {l s='page'}. -
    {/if} {/if} \ No newline at end of file diff --git a/admin/themes/default/template/controllers/products/configuration.tpl b/admin/themes/default/template/controllers/products/configuration.tpl index cbf758d67..cbb7eaa65 100644 --- a/admin/themes/default/template/controllers/products/configuration.tpl +++ b/admin/themes/default/template/controllers/products/configuration.tpl @@ -20,7 +20,7 @@ {if isset($product->id)}
    -

    {l s='Configuration'}

    +

    {l s='Rooms'}

    @@ -101,6 +101,8 @@ {if isset($room_info['id'])} + + {else} @@ -224,6 +226,36 @@
    {*END*} + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Hi {firstname} {lastname},

    + Thank you for selecting our hotel!

    + Bookings in this order are Not Confirmed yet !!
    + We are sorry for your inconvenience. Please contact hotel to get final confirmation for your bookings. +
    +
    + + + + + + +
      + +

    Order details

    + + Order: {order_name} Placed on {date}

    + Payment: {payment}

    + Status: {order_status} +
    +
    +
     
    +
    + + + + + + + + + + + + + + + + + + +
    Room ImageRoom DescriptionHotelRoom CapcityUnit PriceRooms QtyCheck-in DateCheck-out DateTotal
    +   {cart_booking_data_html} +
    +
    +
    + {extra_demands_details_html} +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   {discounts} +
    + + + + + + +
      + + Total Rooms Cost + +  
    +
    + + + + + + +
      + + {room_price_tax_excl} + +  
    +
    + + + + + + +
      + + Extra Services Cost + +  
    +
    + + + + + + +
      + + {additional_service_price_tax_excl} + +  
    +
    + + + + + + +
      + + Discounts + +  
    +
    + + + + + + +
      + + {total_discounts} + +  
    +
    + + + + + + +
      + + Total Convenience Fees + +  
    +
    + + + + + + +
      + + {total_convenience_fee_te} + +  
    +
    + + + + + + +
      + + Total Tax + +  
    +
    + + + + + + +
      + + {total_tax_paid} + +  
    +
    + + + + + + +
      + + Final Booking Amount + +  
    +
    + + + + + + +
      + + {total_paid} + +  
    +
    +
    +
    + + + + +
    + + + + + + +
      + +

    + Customer address

    + + {invoice_block_html} + + +
    +
     
    +
    +
    + + + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +
    + + + If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. + +
    +
     
    + + \ No newline at end of file diff --git a/mails/en/overbooking.txt b/mails/en/overbooking.txt new file mode 100644 index 000000000..a6bd05b32 --- /dev/null +++ b/mails/en/overbooking.txt @@ -0,0 +1,60 @@ +Message from {shop_name} +Hi {firstname} {lastname}, +Thank you for selecting our hotel! +Bookings in this order are Not Confirmed yet !! +We are sorry for your inconvenience. Please contact hotel to get final confirmation for your bookings. + +Order details +Order: {order_name} Placed on {date} +Payment: {payment} +Status: {order_status} + +Room Image +Room Description +Hotel +Room Capcity +Unit Price +Rooms Qty +Check-in Date +Check-out Date +Total + +{cart_booking_data_text} + +{extra_demands_details_text} + +{discounts} + +Total Rooms Cost +{total_products} + +Total Extra Services Cost +{total_extra_demands_te} + +Discounts +{total_discounts} + +Total Rooms Tax +{total_tax_paid} + +Extra Services Tax +{extra_demands_tax} + +Final Booking Amount +{total_paid} + +Customer address +{invoice_block_html} + +You can review your order and download your invoice from the +"Order history" [{history_url}] section of your +customer account by clicking "My account" +[{my_account_url}] on our shop. + +If you have a guest account, you can follow your order via the +"Guest Tracking" +[{guest_tracking_url}?id_order={order_name}] section +on our shop. + +{shop_name} [{shop_url}] powered by +Webkul(tm) [https://webkul.com] \ No newline at end of file diff --git a/mails/en/overbooking_admin.html b/mails/en/overbooking_admin.html new file mode 100755 index 000000000..505142081 --- /dev/null +++ b/mails/en/overbooking_admin.html @@ -0,0 +1,353 @@ + + + + + + Message from {shop_name} + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Hi {firstname} {lastname},

    + New Bookings created on {shop_name}!

    + Bookings in this order have Overbookings !!
    + This order is not confirmed yet. Please check the order details to resolve overbookings. +
    +
    + + + + + + +
      + +

    + Customer details

    + + Name: {customer_name}

    + Email: {customer_email} +
    +
    +
     
    +
    + + + + + + +
      + +

    + Order details

    + + Order: {order_name} Placed on {date}

    + Payment: {payment}

    + Status: {order_status} +
    +
    +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Room ImageRoom DescriptionHotelRoom CapcityUnit PriceRooms QtyCheck-in DateCheck-out DateTotal
    +   {cart_booking_data_html} +
    + {extra_demands_details_html} +
    + +   {discounts} +
    +
    + + + + + + +
      + + Total Rooms Cost + +  
    +
    + + + + + + +
      + + {room_price_tax_excl} + +  
    +
    + + + + + + +
      + + Extra Services Cost + +  
    +
    + + + + + + +
      + + {additional_service_price_tax_excl} + +  
    +
    + + + + + + +
      + + Discounts + +  
    +
    + + + + + + +
      + + {total_discounts} + +  
    +
    + + + + + + +
      + + Total Convenience Fees + +  
    +
    + + + + + + +
      + + {total_convenience_fee_te} + +  
    +
    + + + + + + +
      + + Total Tax + +  
    +
    + + + + + + +
      + + {total_tax_paid} + +  
    +
    + + + + + + +
      + + Final Booking Amount + +  
    +
    + + + + + + +
      + + {total_paid} + +  
    +
    +
    +
    +
     
    + + \ No newline at end of file diff --git a/mails/en/overbooking_admin.txt b/mails/en/overbooking_admin.txt new file mode 100644 index 000000000..a9feed298 --- /dev/null +++ b/mails/en/overbooking_admin.txt @@ -0,0 +1,51 @@ +Message from {shop_name} +Hi {firstname} {lastname}, + +New Bookings created on {shop_name}! +Bookings in this order have Overbookings !! +This order is not confirmed yet. Please check the order details to resolve overbookings. + +Customer details +Name: {customer_name} +Email: {customer_email} + +Order details +Order: {order_name} Placed on {date} +Payment: {payment} +Status: {order_status} + +Room Image +Room Description +Hotel +Room Capcity +Unit Price +Rooms Qty +Check-in Date +Check-out Date +Total + +{cart_booking_data_text} + +{extra_demands_details_text} + +{discounts} + +Total Rooms Cost +{total_products} + +Total Extra Services Cost +{total_extra_demands_te} + +Discounts +{total_discounts} + +Total Rooms Tax +{total_tax_paid} + +Extra Services Tax +{extra_demands_tax} + +Final Booking Amount +{total_paid} + +{shop_name} powered by Webkul™ \ No newline at end of file diff --git a/mails/en/password.html b/mails/en/password.html index 565f9aaa6..b3721eef5 100644 --- a/mails/en/password.html +++ b/mails/en/password.html @@ -104,7 +104,7 @@ - You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. @@ -112,7 +112,7 @@ - If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. diff --git a/mails/en/password.txt b/mails/en/password.txt index 4e314e8fc..1a8b0677f 100644 --- a/mails/en/password.txt +++ b/mails/en/password.txt @@ -9,11 +9,11 @@ PASSWORD: {passwd} You can review your order and download your invoice from the "Order history" [/{history_url}] section of your customer account by -clicking "My account" [/{my_account_url}] on our shop. +clicking "My account" [/{my_account_url}] on our website. If you have a guest account, you can follow your order via the "Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section -on our shop. +on our website. {shop_name} [/{shop_url}] powered by Webkul(tm) [https://webkul.com] diff --git a/mails/en/payment_accepted.html b/mails/en/payment_accepted.html index 8c337c44e..e0f738fcd 100644 --- a/mails/en/payment_accepted.html +++ b/mails/en/payment_accepted.html @@ -71,7 +71,7 @@ Hi {firstname} {lastname},
    - Thank you for shopping with {shop_name}! + Thank you for booking with {shop_name}!
    @@ -104,7 +104,7 @@ - You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. @@ -112,7 +112,7 @@ - If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. diff --git a/mails/en/payment_accepted.txt b/mails/en/payment_accepted.txt index 41e7d6bb8..e77f02b86 100644 --- a/mails/en/payment_accepted.txt +++ b/mails/en/payment_accepted.txt @@ -3,7 +3,7 @@ Hi {firstname} {lastname}, -Thank you for shopping with {shop_name}! +Thank you for booking with {shop_name}! Your payment for order with the reference {order_name} was successfully processed. @@ -12,11 +12,11 @@ successfully processed. You can review your order and download your invoice from the "Order history" [/{history_url}] section of your customer account by -clicking "My account" [/{my_account_url}] on our shop. +clicking "My account" [/{my_account_url}] on our website. If you have a guest account, you can follow your order via the "Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section -on our shop. +on our website. {shop_name} [/{shop_url}] powered by Webkul(tm) [https://webkul.com] diff --git a/mails/en/payment_error.html b/mails/en/payment_error.html index 3f4de0e93..c4af52612 100644 --- a/mails/en/payment_error.html +++ b/mails/en/payment_error.html @@ -105,7 +105,7 @@ - You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. @@ -113,7 +113,7 @@ - If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. diff --git a/mails/en/payment_error.txt b/mails/en/payment_error.txt index bf15780d7..af2b38851 100644 --- a/mails/en/payment_error.txt +++ b/mails/en/payment_error.txt @@ -13,11 +13,11 @@ WE CANNOT SHIP YOUR ORDER UNTIL WE RECEIVE YOUR PAYMENT. You can review your order and download your invoice from the "Order history" [/{history_url}] section of your customer account by -clicking "My account" [/{my_account_url}] on our shop. +clicking "My account" [/{my_account_url}] on our website. If you have a guest account, you can follow your order via the "Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section -on our shop. +on our website. {shop_name} [/{shop_url}] powered by Webkul(tm) [https://webkul.com] diff --git a/mails/en/processing.html b/mails/en/processing.html index febfe804b..695a8e484 100644 --- a/mails/en/processing.html +++ b/mails/en/processing.html @@ -103,7 +103,7 @@ - You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. @@ -111,7 +111,7 @@ - If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. diff --git a/mails/en/processing.txt b/mails/en/processing.txt index 979df0e4b..0bdabe6b6 100644 --- a/mails/en/processing.txt +++ b/mails/en/processing.txt @@ -10,11 +10,11 @@ reference {order_name}. You can review your order and download your invoice from the "Order history" [/{history_url}] section of your customer account by -clicking "My account" [/{my_account_url}] on our shop. +clicking "My account" [/{my_account_url}] on our website. If you have a guest account, you can follow your order via the "Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section -on our shop. +on our website. {shop_name} [/{shop_url}] powered by Webkul(tm) [https://webkul.com] diff --git a/mails/en/refund.html b/mails/en/refund.html index 40a9d7715..aa55b592f 100644 --- a/mails/en/refund.html +++ b/mails/en/refund.html @@ -103,7 +103,7 @@ - You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. @@ -111,7 +111,7 @@ - If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. diff --git a/mails/en/refund.txt b/mails/en/refund.txt index 7c1a7e414..594d655ea 100644 --- a/mails/en/refund.txt +++ b/mails/en/refund.txt @@ -10,11 +10,11 @@ reference {order_name}. You can review your order and download your invoice from the "Order history" [/{history_url}] section of your customer account by -clicking "My account" [/{my_account_url}] on our shop. +clicking "My account" [/{my_account_url}] on our website. If you have a guest account, you can follow your order via the "Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section -on our shop. +on our website. {shop_name} [/{shop_url}] powered by Webkul(tm) [https://webkul.com] diff --git a/mails/en/shipped.html b/mails/en/shipped.html index 99f0e8181..214d45f0b 100644 --- a/mails/en/shipped.html +++ b/mails/en/shipped.html @@ -89,7 +89,7 @@ Order {order_name} - Shipped

    Your order with the reference {order_name} has been shipped.
    - Thank you for shopping with {shop_name}!
    + Thank you for booking with {shop_name}!   @@ -100,7 +100,7 @@ - You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. diff --git a/mails/en/shipped.txt b/mails/en/shipped.txt index 97d9719bb..c9fc26fa9 100644 --- a/mails/en/shipped.txt +++ b/mails/en/shipped.txt @@ -7,11 +7,11 @@ Your order has been shipped Your order with the reference {order_name} has been shipped. -Thank you for shopping with {shop_name}! +Thank you for booking with {shop_name}! You can review your order and download your invoice from the "Order history" [/{history_url}] section of your customer account by -clicking "My account" [/{my_account_url}] on our shop. +clicking "My account" [/{my_account_url}] on our website. {shop_name} [/{shop_url}] powered by Webkul(tm) [https://webkul.com] diff --git a/mails/en/test.html b/mails/en/test.html index 86c46cedd..9487d832b 100644 --- a/mails/en/test.html +++ b/mails/en/test.html @@ -78,7 +78,7 @@ - This is a test e-mail from your shop.

    If you can read this, the test was successful!. + This is a test e-mail from your website.

    If you can read this, the test was successful!.
    diff --git a/mails/en/test.txt b/mails/en/test.txt index d3b6c596e..fa2b9346f 100644 --- a/mails/en/test.txt +++ b/mails/en/test.txt @@ -3,7 +3,7 @@ Hello -This is a TEST E-MAIL from your shop. +This is a TEST E-MAIL from your website. If you can read this, the test was successful!. diff --git a/modules/bankwire/controllers/front/validation.php b/modules/bankwire/controllers/front/validation.php index 5df9b7411..c524724bf 100644 --- a/modules/bankwire/controllers/front/validation.php +++ b/modules/bankwire/controllers/front/validation.php @@ -35,7 +35,7 @@ class BankwireValidationModuleFrontController extends ModuleFrontController public function postProcess() { $cart = $this->context->cart; - if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active) + if ($cart->id_customer == 0 || !$this->module->active) Tools::redirect('index.php?controller=order&step=1'); // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process @@ -55,9 +55,8 @@ class BankwireValidationModuleFrontController extends ModuleFrontController // Check Order restrict condition before Payment by the customer if (Module::isInstalled('hotelreservationsystem') && Module::isEnabled('hotelreservationsystem')) { require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php'; - $order_restrict_error = HotelOrderRestrictDate::validateOrderRestrictDateOnPayment($this); - if ($order_restrict_error) { - die($this->errors); + if (HotelOrderRestrictDate::validateOrderRestrictDateOnPayment($this)) { + Tools::redirect('index.php?controller=order-opc'); } } diff --git a/modules/bankwire/translations/ar.php b/modules/bankwire/translations/ar.php index fce00418f..020c78daa 100644 --- a/modules/bankwire/translations/ar.php +++ b/modules/bankwire/translations/ar.php @@ -2,53 +2,60 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'التحويل البنكي'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'قبول خلاص مشترياتك عبر التحويل البنكي.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'هل أنت متأكد أنك تريد حذف البيانات الخاصة بك؟'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'يجب تكوين حساب المالك والتفاصيل من اجل استخدام هذه الوحدة بشكل صحيح.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'لا توجد عملة محددة لهذه الإضافة.'; +$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'تحويل بنكي'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'تتيح لك هذه الوحدة قبول الدفعات مقابل الحجوزات عبر التحويل البنكي.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'هل أنت متأكد من إزالة هذه التفاصيل؟'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'يجب تكوين مالك الحساب وتفاصيل الحساب قبل استخدام هذه الوحدة.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'لم يتم تعيين أي عملة لهذه الوحدة.'; $_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'تفاصيل الحساب مطلوبة.'; $_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'مطلوب صاحب الحساب.'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'تم تحديث الإعدادات بنجاح'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'تفاصيل الاتصال'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'حساب مالك'; -$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'النفاصيل'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'مثل فرع البنك ، IBAN رقم ، BIC ، الخ.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'تم تحديث الإعدادات'; +$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'الدفع عن طريق سلك البنك'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'بيانات المتصل'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'صاحب حساب'; +$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'تفاصيل'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'مثل فرع البنك ورقم IBAN وBIC وما إلى ذلك.'; $_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'عنوان البنك'; -$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'حفظ'; +$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'يحفظ'; $_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'طريقة الدفع هذه غير متوفرة.'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'اتمام الطلب'; -$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'ملخص طلب الشراء'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'سلة الشراء فارغة'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'التحويل البنكي'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'كنت قد اخترت الدفع بواسطة التحويل البنكي.'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'هنا ملخص طلب الشراء:'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'المبلغ الإجمالي لطلبك'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(شامل للضريبة)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'نحن نقبل أن تكون ارسلت عدة عملات من خلال التحويل البنكي.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'اختيار واحد من الإجراءات التالية :'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'نحن نقبل العملات التالية ليتم إرسالها بواسطة التحويل البنكي :'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'سيتم عرض معلومات الحساب المصرفي في الصفحة التالية.'; -$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'أؤكد طلبي'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'العودة إلى الخروج'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'الدفع'; +$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'الدفع بالتحويل البنكي'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'ملخص الطلب'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'سلة التسوق الخاصة بك فارغة.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'لقد اخترت الدفع عن طريق التحويل البنكي.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'فيما يلي ملخص قصير لطلبك:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'مجموع طلبك هو'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(شامل الضريبة)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'نحن نسمح بإرسال العديد من العملات عبر التحويل البنكي.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'اختر واحد من ما يلي:'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'نحن نسمح بإرسال العملة التالية عبر التحويل البنكي:'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'سيتم عرض معلومات حساب التحويل البنكي في الصفحة التالية.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'الرجاء تأكيد طلبك بالنقر على \"أؤكد طلبي\".'; $_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'طرق الدفع الأخرى'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'هذه الوحدة تسمح لك لقبول المدفوعات عن طريق التحويل البنكي.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'اذا اختار الحريف الدفع بواسطة التحويل البنكي،فإن وضعية الطلب ستتحول الى "في انتظار الدفع"'; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'لذا، يجب عليك تأكيد الطلب يدوياً حالما تتلقى التحويل البنكي.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'اكتمال طلبك بنسبة %s .'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'الرجاء ارسال التحويل البنكي مع:'; -$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'الكمية'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'إلى صاحب حساب'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'مع هذه التفاصيل'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'اسم البنك'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'لا تنسى ادخال مرجع طلبك %s في خانة الموضوع على ورقة التحويل البنكي.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'تم ارسال بريد إلكتروني إليك مع هذه المعلومات.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'سيتم إرسال طلبك بمجرد استلامنا التسوية الخاصة بك.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'لأية أسئلة أو لمزيد من المعلومات ، يرجى الاتصال'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'لاحظنا مشكلة مع النظام الخاص بك. إذا كنت تعتقد أن هذا خطأ ، يمكنك الاتصال بنا'; +$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'أنا أؤكد طلبيتي'; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'تسمح لك هذه الوحدة بقبول المدفوعات الآمنة عن طريق التحويل البنكي.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'إذا اختار العميل الدفع عن طريق التحويل البنكي، فستتغير حالة الطلب إلى \"في انتظار الدفع\".'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'ومع ذلك، يجب عليك تأكيد الطلب يدويًا عند استلام التحويل البنكي.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'طلبك على %s اكتمل.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'من فضلك أرسل لنا حوالة مصرفية مع:'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'كمية'; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'اسم صاحب الحساب:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'قم بتضمين هذه التفاصيل:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'عنوان البنك:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'لا تنس إدخال رقم طلبك #%d في موضوع التحويل البنكي الخاص بك.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'لا تنس إدخال مرجع طلبك %s في موضوع التحويل البنكي الخاص بك.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'لقد لاحظنا وجود مشكلة في طلبك. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'فريق دعم العملاء الخبراء'; $_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'الدفع عن طريق التحويل البنكي'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(اجراءات الطلب ستكون اطول)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'دعم العملاء'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(معالجة الطلب سوف تكون أطول)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'فيما يلي تفاصيل البنك الخاصة بالتحويل:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'كمية:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'صاحب حساب:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'تفاصيل الحساب:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'عنوان البنك:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'فيما يلي تفاصيل البنك الخاصة بالتحويل:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'كمية:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'صاحب حساب:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'تفاصيل الحساب:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'عنوان البنك:'; diff --git a/modules/bankwire/translations/bg.php b/modules/bankwire/translations/bg.php index 6c11e97c9..07ffc1408 100644 --- a/modules/bankwire/translations/bg.php +++ b/modules/bankwire/translations/bg.php @@ -2,59 +2,60 @@ global $_MODULE; $_MODULE = array(); - $_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Банков превод'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Приемане на плащания за продуктите Ви с банков превод.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Сигурни ли сте, че искате да изтриете тези данни?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Собственикът и данните на профила трябва да бъдат конфигурирани преди да ползвате този модул.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Не е зададена валута за този модул.'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Подробните данни за профила са задължителни.'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Нужен е собственик на профила.'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Настройките са обновени'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Този модул ви позволява да приемате плащания за резервации чрез банков превод.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Сигурни ли сте, че премахвате тези подробности?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Собственикът на акаунта и подробностите за акаунта трябва да бъдат конфигурирани, преди да използвате този модул.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'За този модул не е зададена валута.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Необходими са данни за акаунта.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Изисква се собственик на акаунт.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Настройките обновени'; $_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Плащане по банков път'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Детайли за контакт'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Собственик на профила'; -$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Детайли'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Като клон на банка, IBAN номер, BIC, и други.'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Адрес на банката'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Данни за контакт'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Собственик на акаунт'; +$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Подробности'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Като банков клон, IBAN номер, BIC и др.'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'банкова сметка'; $_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Запазване'; -$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Този начин на плащане не е възможен.'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Назад към сметката'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Сметка'; +$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Този метод на плащане не е наличен.'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Върнете се в касата'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Разгледайте'; $_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Плащане по банков път'; -$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Обобщение на поръчката'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Вашата количка е празна.'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Банков превод'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Избрахте да платите чрез банков превод.'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Кратко обобщение на поръчката:'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Общата стойност на поръчката Ви е'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(с данък)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Приемаме няколко валути за плащания по банков път.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Моля, изберете една от следните:'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Приемаме следните валути при изпращане по банков път:'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Банковите ни реквизити ще бъдат показани на следващата страница.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Моля, потвърдете вашата поръчката като натиснете на "Потвърждавам поръчката си".'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Резюме на поръчката'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Вашата пазарска количка е празна.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Избрали сте плащане по банков път.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Ето кратко резюме на вашата поръчка:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Общата сума на вашата поръчка е'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(вкл. данък)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Ние позволяваме няколко валути да бъдат изпращани по банков път.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Изберете едно от следните:'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Разрешаваме следната валута да бъде изпратена по банков път:'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Информацията за сметката за банков превод ще бъде показана на следващата страница.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Моля, потвърдете поръчката си, като щракнете върху „Потвърждавам поръчката си“.'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Други начини на плащане'; $_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Потвърждавам поръчката си'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Други начини за плащане'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Този модул Ви позволява да приемате плащания по банков път.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Ако клиентът избере да плати с банков превод, статуса на поръчката ще се промени на "Очаква плащане".'; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Т.е. трябва ръчно да потвърдите поръчката след получаване на банковия превод.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Поръчката Ви в %s е завършена.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Моля изпратете ни банков превод с'; -$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Сума за плащане'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'Име на собственика на профила'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'Включете тези данни'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'Наименование на банката'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Не забравяйте да посочите номера на поръчката си №%d като основание за превода.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Не забравяйте да посочите референцията на поръчката си %s като основание за превод.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Имейл с тази информация беше изпратен до Вас.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Вашата поръчка ще бъде изпратена веднага след като получим вашето плащане.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'За въпроси или подробна информация, моля свържете се с нашият'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'отдел експертно обслужване на клиенти'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Забелязахме че има проблем с вашата поръчка. Ако мислите че това е грешка свържете се с нашият'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Плащане чрез банков превод'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(обработката на поръчката ще бъде по-дълга)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'отдел обслужване на клиенти.'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Този модул ви позволява да приемате сигурни плащания по банков път.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Ако клиентът избере да плати по банков път, статусът на поръчката ще се промени на „Чака плащане“.'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Въпреки това трябва ръчно да потвърдите поръчката при получаване на банковия превод.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Вашата поръчка на %s е завършена.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Моля, изпратете ни банков превод с:'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Количество'; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Име на собственика на акаунта:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Включете тези подробности:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Банкова сметка:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Не забравяйте да въведете номера на вашата поръчка #%d в темата на банковия си превод.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Не забравяйте да въведете референтния номер на поръчката си %s в темата на банковия си превод.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Забелязахме проблем с вашата поръчка. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'експертен екип за поддръжка на клиенти'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Платете по банков път'; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(обработването на поръчката ще бъде по-дълго)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Ето банковите данни за вашия превод:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Количество:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Собственик на акаунт:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Детайли за акаунта:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Банкова сметка:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Ето банковите данни за вашия превод:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Количество:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Собственик на акаунт:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Детайли за акаунта:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Банкова сметка:'; diff --git a/modules/bankwire/translations/ca.php b/modules/bankwire/translations/ca.php index 71045beab..52a3252f2 100644 --- a/modules/bankwire/translations/ca.php +++ b/modules/bankwire/translations/ca.php @@ -2,59 +2,60 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transferència bancària'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Acceptar pagaments pels vostres productes mitjançant transferència bancària.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'N\'esteu segurs que voleu esborrar aquestes dades?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Cal configurar el titular del compte i els detalls per a utilitzar aquest mòdul correctament.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'No hi ha moneda definida per aquest mòdul.'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Els detalls del compte són necessaris.'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'El titular del compte és necessari.'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Configuració modificada'; -$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Pagament amb Transferència bancària'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Dades de contacte'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Titular del compte'; +$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'transferència bancària'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Aquest mòdul us permet acceptar pagaments de reserves mitjançant transferència bancària.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Esteu segur d\'eliminar aquests detalls?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'El propietari del compte i els detalls del compte s\'han de configurar abans d\'utilitzar aquest mòdul.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'No s\'ha establert cap moneda per a aquest mòdul.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Els detalls del compte són obligatoris.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Es requereix el propietari del compte.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'S\'ha actualitzat la configuració'; +$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Pagar per transferència bancària'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Detalls de contacte'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Propietari del compte'; $_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Detalls'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Tals com la sucursal bancària, número IBAN, BIC, etc'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Adreça de l\'oficina bancària'; -$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Desar'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Com ara sucursal bancària, número IBAN, BIC, etc.'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Adreça bancària'; +$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Desa'; $_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Aquesta forma de pagament no està disponible.'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Torneu a Fer la compra'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Realitza la compra'; -$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Pagament per transferència'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Torna a la caixa'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Pagament'; +$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Pagament per transferència bancària'; $_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Resum de la comanda'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'El vostre carret de la compra és buit.'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transferència bancària'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Heu escollit pagar mitjançant transferència bancària.'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Breu resum de la vostra comanda:'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'L\'import total de la vostra comanda és'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(amb impostos)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Acceptem diverses monedes per transferència bancària.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Escolliu-ne un dels següents:'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Acceptem les següents divises per realitzar la transferència bancària:'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'La seva cistella de la compra és buida.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Heu optat per pagar per transferència bancària.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí teniu un breu resum de la vostra comanda:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'L\'import total de la teva comanda és'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(IVA inclòs)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Permetem l\'enviament de diverses monedes mitjançant transferència bancària.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Trieu una de les opcions següents:'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Permetem que la moneda següent s\'enviï mitjançant transferència bancària:'; $_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'La informació del compte bancari es mostrarà a la pàgina següent.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Si us plau, confirmeu la vostra comanda fent clic a "Confirmo la meva comanda".'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Si us plau, confirmeu la vostra comanda fent clic a \"Confirmo la meva comanda\".'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Altres formes de pagament'; $_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo la meva comanda'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Altres mètodes de pagament'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Aquest mòdul us permet acceptar pagaments per transferència bancària.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Si el client opta per aquesta forma de pagament, la comanda passarà a l\'estat de "Pendent de pagament."'; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Per tant, heu de confirmar manualment la comanda tan aviat com rebeu la transferència.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'La vostra comanda de %s s\'ha completat.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Si us plau, envieu-nos una transferència bancària amb'; -$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Quantitat'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'Nom del titular del compte'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'Amb aquests detalls'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'Nom del banc'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'No us oblideu d\'inserir el vostre número de comanda #%d al concepte de la transferència bancària.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'No us oblideu d\'inserir el vostre número de referència %s al concepte de la transferència bancària.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Us hem enviat un e-mail amb aquesta informació.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'La vostra comanda s\'enviarà tan aviat com rebem el vostre ingrés.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Per a qualsevol dubte o més informació, poseu-vos en contacte amb'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'servei d\'atenció al client'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hem detectat un problema amb la vostra comanda. Si penseu que això és un error, us podeu posar en contacte amb el nostre'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Pagament amb transferència bancària'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el processament de la comanda trigarà)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'servei d\'atenció al client'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Aquest mòdul us permet acceptar pagaments segurs per transferència bancària.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Si el client decideix pagar per transferència bancària, l\'estat de la comanda canviarà a \"Esperant el pagament\".'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Dit això, heu de confirmar manualment la comanda en rebre el transfer bancari.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'La teva comanda a %s s\'ha completat.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Envieu-nos una transferència bancària amb:'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Import'; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Nom del propietari del compte:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Incloeu aquests detalls:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Adreça bancària:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'No oblideu inserir el vostre número de comanda #%d a l\'assumpte de la vostra transferència bancària.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'No oblideu inserir la vostra referència de comanda %s a l\'assumpte de la vostra transferència bancària.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hem detectat un problema amb la teva comanda. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'equip expert d\'atenció al client'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Pagar per transferència bancària'; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el processament de la comanda serà més llarg)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Aquí teniu les dades bancàries per a la vostra transferència:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Import:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Propietari del compte:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Detalls de la Compta:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Adreça bancària:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Aquí teniu les dades bancàries per a la vostra transferència:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Import:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Propietari del compte:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Detalls de la Compta:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Adreça bancària:'; diff --git a/modules/bankwire/translations/de.php b/modules/bankwire/translations/de.php index 0f2c984f1..12538908e 100644 --- a/modules/bankwire/translations/de.php +++ b/modules/bankwire/translations/de.php @@ -2,59 +2,60 @@ global $_MODULE; $_MODULE = array(); - $_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Banküberweisung'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Zahlung per Banküberweisung annehmen.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Möchten Sie die Details wirklich löschen?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Kontoinhaber und Details müssen erfasst sein, um dieses Modul nutzen zu können.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Keine Währung für dieses Modul festgelegt.'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Konto-Details erforderlich'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Kontoinhaber erforderlich'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Mit diesem Modul können Sie Zahlungen für Buchungen per Banküberweisung akzeptieren.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Sind Sie sicher, dass Sie diese Details entfernen möchten?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Kontoinhaber und Kontodetails müssen vor der Verwendung dieses Moduls konfiguriert werden.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Für dieses Modul wurde keine Währung festgelegt.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Kontodaten sind erforderlich.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Kontoinhaber ist erforderlich.'; $_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert'; -$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Zahlung per Überweisung'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Kontaktangaben'; +$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Bezahlen Sie per Banküberweisung'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Kontaktdetails'; $_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Kontoinhaber'; -$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Details'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'wie Zweigstelle, IBAN-Nummer, BIC, etc.'; +$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Einzelheiten'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Wie Bankfiliale, IBAN-Nummer, BIC usw.'; $_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Bankadresse'; $_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern'; -$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Zahlungsart nicht verfügbar'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Zurück zum Bestellvorgang'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Bestellvorgang'; -$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Zahlung per Überweisung'; +$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Diese Zahlungsmethode ist nicht verfügbar.'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Gehen Sie zurück zur Kasse'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Kasse'; +$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Zahlung per Banküberweisung'; $_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Bestellübersicht'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Ihr Warenkorb ist leer'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Banküberweisung'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Sie möchten per Banküberweisung zahlen.'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Kurze Zusammenfassung Ihrer Bestellung:'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Der Gesamtbetrag Ihrer Bestellung beträgt'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(inkl. MwSt.)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Für bestimmte Währungen akzeptieren wir auch eine Überweisung.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Bitte wählen Sie eine aus:'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Wir nehmen folgende Währung per Überweisung an:'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Die Kontoinformationen zur Überweisung erhalten Sie auf der folgenden Seite.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Bitte bestätigen Sie Ihre Bestellung durch Klicken auf "KAUFEN".'; -$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'KAUFEN'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere Zahlungsarten'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Dieses Modul ermöglicht es Ihnen, Zahlungen per Banküberweisung zu erhalten.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Wenn der Kunde Banküberweisung wählt, wird der Bestellstatus auf "Warte auf Zahlung" umgestellt.'; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Aus diesem Grund müssen Sie den Auftrag nach Zahlungseingang bestätigen.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Ihre Bestellung auf %s ist abgeschlossen.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Bitte senden Sie uns eine Überweisung in Höhe von:'; -$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Betrag'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'an den Kontoinhaber von'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'mit dieser Bankverbindung'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'an diese Bank'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Als Verwendungszweck der Überweisung geben Sie bitte die Bestellnummer %d an.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Geben Sie bitte Ihre Auftrags-Nr. %s als Verwendungszweck der Überweisung an.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Eine E-Mail wurde Ihnen mit diesen Informationen zugeschickt.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Ihre Bestellung wird versandt, sobald wir Ihre Überweisung erhalten haben.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Bei Fragen oder für weitere Informationen kontaktieren Sie bitte unseren'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'Kunden-Support'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Wir haben bei Ihrer Bestellung ein Problem festgestellt. Wenn Sie denken, dies sei ein Fehler, kontaktieren Sie bitte unseren'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Zahlung per Überweisung '; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(Bearbeitung dauert länger)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'Kunden-Support'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Dein Einkaufswagen ist leer.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Sie haben sich für die Zahlung per Banküberweisung entschieden.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier ist eine kurze Zusammenfassung Ihrer Bestellung:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Der Gesamtbetrag der Bestellung ist'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(Steuer inkl.)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Wir erlauben den Versand verschiedener Währungen per Banküberweisung.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Wähle eines der Folgenden:'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Wir erlauben den Versand der folgenden Währung per Banküberweisung:'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Die Informationen zum Banküberweisungskonto werden auf der nächsten Seite angezeigt.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Bitte bestätigen Sie Ihre Bestellung, indem Sie auf „Ich bestätige meine Bestellung“ klicken.'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere Zahlungsmethoden'; +$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Ich bestätige meine Bestellung'; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Mit diesem Modul können Sie sichere Zahlungen per Banküberweisung akzeptieren.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Wenn der Kunde die Zahlung per Banküberweisung wählt, ändert sich der Status der Bestellung in „Warten auf Zahlung“.'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Allerdings müssen Sie die Bestellung nach Erhalt der Banküberweisung manuell bestätigen.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Ihre Bestellung am %s ist abgeschlossen.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Bitte senden Sie uns eine Banküberweisung mit:'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Menge'; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Name des Kontoinhabers:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Geben Sie diese Details an:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Bankadresse:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Vergessen Sie nicht, Ihre Bestellnummer #%d in den Betreff Ihrer Banküberweisung einzugeben.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Vergessen Sie nicht, Ihre Bestellnummer %s in den Betreff Ihrer Banküberweisung einzufügen.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Wir haben ein Problem mit Ihrer Bestellung festgestellt. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'kompetentes Kundensupport-Team'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Bezahlen Sie per Banküberweisung'; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(Bestellabwicklung wird länger dauern)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Hier finden Sie die Bankverbindung für Ihre Überweisung:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Menge:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Kontoinhaber:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Kontodetails:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Bankadresse:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Hier finden Sie die Bankverbindung für Ihre Überweisung:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Menge:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Kontoinhaber:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Kontodetails:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Bankadresse:'; diff --git a/modules/bankwire/translations/en.php b/modules/bankwire/translations/en.php index 343adcaf9..e69de29bb 100644 --- a/modules/bankwire/translations/en.php +++ b/modules/bankwire/translations/en.php @@ -1,60 +0,0 @@ -bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Bank wire'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Accept payments for your products via bank wire transfer.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Are you sure about removing these details?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Account owner and account details must be configured before using this module.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'No currency has been set for this module.'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Account details are required.'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Account owner is required.'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Settings updated'; -$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Pay by Bank Wire'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Contact details'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Account owner'; -$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Details'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Such as bank branch, IBAN number, BIC, etc.'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Bank address'; -$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Save'; -$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'This payment method is not available.'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout'; -$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Bank-wire payment'; -$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Your shopping cart is empty.'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Bank wire'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'You have chosen to pay by bank wire.'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Here is a short summary of your order:'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'The total amount of your order is'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'We allow several currencies to be sent via bank wire.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Choose one of the following:'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'We allow the following currency to be sent via bank wire:'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Bank wire account information will be displayed on the next page.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Please confirm your order by clicking "I confirm my order".'; -$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'I confirm my order'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'This module allows you to accept secure payments by bank wire.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'If the client chooses to pay by bank wire, the order\'s status will change to \'Waiting for Payment.\''; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'That said, you must manually confirm the order upon receiving the bank wire.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Your order on %s is complete.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Please send us a bank wire with'; -$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Amount'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'Name of account owner'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'Include these details'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'Bank name'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Do not forget to insert your order number #%d in the subject of your bank wire.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Do not forget to insert your order reference %s in the subject of your bank wire.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'An email has been sent with this information.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Your order will be sent as soon as we receive payment.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'If you have questions, comments or concerns, please contact our'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'expert customer support team'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'We noticed a problem with your order. If you think this is an error, feel free to contact our'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Pay by bank wire'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(order processing will be longer)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'customer service department.'; - - -return $_MODULE; diff --git a/modules/bankwire/translations/es.php b/modules/bankwire/translations/es.php index 309928da4..e872c0c56 100644 --- a/modules/bankwire/translations/es.php +++ b/modules/bankwire/translations/es.php @@ -2,59 +2,60 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Aceptar pagos para sus productos a través de transferencia bancaria.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = '¿Está seguro de querer borrar los detalles?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'El propietario y detalles de la cuenta deben configurarse para usar el módulo correctamente.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'No se ha configurado ninguna divisa para este módulo.'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Se necesitan los detalles de la cuenta.'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Se necesita el propietario de la cuenta.'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada'; -$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Pagar con transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Detalles del contacto'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Titular de la cuenta'; +$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'transferencia bancaria'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Este módulo le permite aceptar pagos de reservas mediante transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = '¿Estás seguro de eliminar estos detalles?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'El propietario de la cuenta y los detalles de la cuenta deben configurarse antes de usar este módulo.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'No se ha establecido ninguna moneda para este módulo.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Se requieren detalles de la cuenta.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Se requiere propietario de la cuenta.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Ajustes actualizan'; +$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Pagar mediante transferencia bancaria'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Detalles de contacto'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Propietario de la cuenta'; $_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Detalles'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Tales como: sucursal bancaria, código IBAN, BIC, etc.'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Dirección sucursal bancaria'; -$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; -$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Esta forma de pago no está disponible.'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Volver al Pedido'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Procesos de Pedido'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Como sucursal bancaria, número IBAN, BIC, etc.'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Dirección del banco'; +$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Ahorrar'; +$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Este método de pago no está disponible.'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Volver a la caja'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Verificar'; $_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Pago por transferencia bancaria'; $_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Resumen del pedido'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Su carrito está vacío.'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Ha elegido pagar por transferencia bancaria.'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí tiene un resumen de su pedido:'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'El importe total de su pedido es'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(impuestos inc.)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Aceptamos diferentes monedas para la transferencia bancaria.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Elija una de las siguientes:'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Aceptamos las siguientes monedas para las transferencias bancarias:'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'La información para realizar la transferencia bancaria aparecerá en la página siguiente.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Por favor, confirme su pedido haciendo clic en "confirmo mi pedido".'; -$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo mi pedido'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Otros modos de pago'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Este módulo permite aceptar pagos por transferencia bancaria.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Si el cliente elige pagar por transferencia bancaria, el pedido cambiará su estado a "Pendiente de pago"'; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Por lo tanto, deberás confirmar el pedido en cuanto recibas la transferencia.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Su pedido de %s está completo.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Por favor, háganos una transferencia por'; -$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Importe'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'Propietario de la cuenta'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'Con los siguientes datos'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'Banco'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'No se olvide de insertar su número de pedido #%d en el concepto de su transferencia bancaria.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'No se olvide de indicar su número de pedido %s en el concepto de su transferencia bancaria.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Le hemos enviado un email con esta información.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Su pedido será enviado próximamente, en cuanto recibamos su pago.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Para cualquier duda o para más información, póngase en contacto con nuestro servicio'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'equipo experto de soporte al vendedor'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hay un problema con su pedido, póngase en contacto con el servicio de atención al cliente.'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Pago por transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el procesamiento del pedido tomará más tiempo)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'de atención al cliente'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Su cesta está vacía.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Ha elegido pagar mediante transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí hay un breve resumen de su pedido:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'El monto total de su orden es'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(impuestos incluidos)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Permitimos el envío de varias monedas mediante transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Elige uno de los siguientes:'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Permitimos el envío de las siguientes monedas mediante transferencia bancaria:'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'La información de la cuenta de transferencia bancaria se mostrará en la página siguiente.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Por favor confirme su pedido haciendo clic en \"Confirmo mi pedido\".'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'otros métodos de pago'; +$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Yo confirmo mi orden'; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Este módulo le permite aceptar pagos seguros mediante transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Si el cliente elige pagar mediante transferencia bancaria, el estado del pedido cambiará a \"Esperando pago\".'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Dicho esto, debes confirmar manualmente el pedido al recibir la transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Su pedido el %s está completo.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Por favor envíenos una transferencia bancaria con:'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Cantidad'; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Nombre del propietario de la cuenta:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Incluya estos detalles:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Dirección del banco:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'No olvide insertar su número de pedido #%d en el asunto de su transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'No olvides insertar la referencia de tu pedido %s en el asunto de tu transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hemos notado un problema con su pedido. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'equipo de atención al cliente experto'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Pagar por transferencia bancaria'; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el procesamiento del pedido será más largo)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Aquí tienes los datos bancarios de tu transferencia:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Cantidad:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Propietario de la cuenta:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Detalles de la cuenta:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Dirección del banco:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Aquí tienes los datos bancarios de tu transferencia:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Cantidad:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Propietario de la cuenta:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Detalles de la cuenta:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Dirección del banco:'; diff --git a/modules/bankwire/translations/fr.php b/modules/bankwire/translations/fr.php index c2f9293fd..df03451a6 100644 --- a/modules/bankwire/translations/fr.php +++ b/modules/bankwire/translations/fr.php @@ -2,59 +2,60 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Virement bancaire'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Accepter les paiements par virement.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Êtes-vous certain de vouloir effacer vos données ?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Le titulaire du compte et les informations bancaires doivent être configurés.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Aucune devise disponible pour ce module'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Les détails du compte sont requis'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Le titulaire du compte est requis.'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Mise à jour réussie'; +$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'virement bancaire'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Ce module vous permet d\'accepter les paiements des réservations par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Êtes-vous sûr de vouloir supprimer ces informations ?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Le propriétaire du compte et les détails du compte doivent être configurés avant d\'utiliser ce module.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Aucune devise n\'a été définie pour ce module.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Les détails du compte sont requis.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Le propriétaire du compte est requis.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; $_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Payer par virement bancaire'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Titulaire'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Détails du contact'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Propriétaire du compte'; $_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Détails'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Comme le code banque, l\'IBAN ou encore le BIC.'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Adresse de la banque'; -$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; -$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Retour à la commande'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Processus de commande'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Tels que l\'agence bancaire, le numéro IBAN, le BIC, etc.'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'adresse de la banque'; +$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Ce mode de paiement n\'est pas disponible.'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Revenir à la caisse'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Vérifier'; $_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Paiement par virement bancaire'; -$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Virement bancaire'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Vous avez choisi de régler par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de la commande'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Vous avez choisi de payer par virement bancaire.'; $_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande s\'élève à'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Nous acceptons plusieurs devises pour votre virement.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Merci de choisir parmi les suivantes :'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Nous acceptons la devise suivante pour votre paiement :'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Nos coordonnées bancaires seront affichées sur la page suivante.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Veuillez confirmer votre commande en cliquant sur « Je confirme ma commande ».'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande est'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(taxes comprises)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Nous autorisons l\'envoi de plusieurs devises par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Choisissez l\'une des options suivantes :'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Nous autorisons l\'envoi des devises suivantes par virement bancaire :'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Les informations sur le compte de virement bancaire seront affichées sur la page suivante.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Merci de confirmer votre commande en cliquant sur \"Je confirme ma commande\".'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres modes de paiement'; $_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Ce module vous permet d\'accepter les paiements par virement bancaire.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état "Paiement en attente".'; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Par conséquent, vous devez confirmer manuellement la commande dès que vous recevrez le virement.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Veuillez nous envoyer un virement bancaire avec :'; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Ce module vous permet d\'accepter des paiements sécurisés par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Si le client choisit de payer par virement bancaire, le statut de la commande passera à « En attente de paiement ».'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Cela dit, vous devez confirmer manuellement la commande dès réception du virement bancaire.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s est terminée.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Merci de nous envoyer un virement bancaire avec :'; $_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Montant'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'à l\'ordre de'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'suivant ces détails'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'à cette banque'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'N\'oubliez pas d\'indiquer votre numéro de commande %d dans l\'objet de votre virement.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s dans le sujet de votre virement.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Un e-mail contenant ces informations vous a été envoyé.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Votre commande sera expédiée dès réception de votre virement.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'service client'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Nous avons rencontré un problème avec votre commande. Nous vous invitons à prendre contact avec notre'; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Nom du propriétaire du compte :'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Incluez ces détails :'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Adresse de la banque:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'N\'oubliez pas d\'insérer votre numéro de commande #%d dans l\'objet de votre virement bancaire.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'N\'oubliez pas d\'insérer votre référence de commande %s dans l\'objet de votre virement bancaire.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Nous avons remarqué un problème avec votre commande. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'équipe de support client experte'; $_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Payer par virement bancaire'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(le traitement de la commande sera plus long)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'support client'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(le traitement des commandes sera plus long)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Voici les coordonnées bancaires de votre virement :'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Montant:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Propriétaire du compte:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Détails du compte:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Adresse de la banque:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Voici les coordonnées bancaires de votre virement :'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Montant:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Propriétaire du compte:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Détails du compte:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Adresse de la banque:'; diff --git a/modules/bankwire/translations/gl.php b/modules/bankwire/translations/gl.php index 4e384d0cb..b1869131f 100644 --- a/modules/bankwire/translations/gl.php +++ b/modules/bankwire/translations/gl.php @@ -2,45 +2,60 @@ global $_MODULE; $_MODULE = array(); - $_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = '¿esta usted seguro de querer eliminar estos detalles?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'O titular da conta e os detalles deben ser configurados para utilizar esta conta correctamente'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Moeda establecida para este modulo'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Requirese detalles da conta'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Requirese titular da conta'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'configuracion de actualizacion'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Detalles de contacto'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Conta'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Este módulo permítelle aceptar pagos de reservas mediante transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Estás seguro de eliminar estes detalles?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'O propietario e os detalles da conta deben configurarse antes de usar este módulo.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Non se estableceu ningunha moeda para este módulo.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Os detalles da conta son necesarios.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'É necesario o propietario da conta.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada'; +$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Pago por transferencia bancaria'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Datos de contacto'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Propietario da conta'; $_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Detalles'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Tal como sucursal bancaria, número IBAN, BIC, etc'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Enderezo do banco'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Como sucursal bancaria, número IBAN, BIC, etc.'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Enderezo bancario'; $_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Gardar'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Confirmación de pedido'; -$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Sumario de pedidos'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'A súa Cesta está Vacía'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Usted ha elexido pagar mediante transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Pequeno resume do seu pedido'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'O importe total do seu pedido é de'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(IVA incl)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Aceptamos distintas moedas para pago por transferencia'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Elixa entre o seguinte:'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Aceptamos as moedas seguintes para pago por transferencia'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'A informacion da conta bancaria mostraráse na páxina seguinte'; +$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Este método de pago non está dispoñible.'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Volve á caixa'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Comprobar'; +$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Pago por transferencia bancaria'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Resumo do pedido'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'A túa cesta da compra está baleira.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Escolleu pagar por transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí tes un pequeno resumo do teu pedido:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'O importe total do seu pedido é'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(impostos incluídos)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Permitimos o envío de varias moedas mediante transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Escolla unha das seguintes opcións:'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Permitimos o envío da seguinte moeda mediante transferencia bancaria:'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'A información da conta bancaria mostrarase na páxina seguinte.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Confirma o teu pedido facendo clic en \"Confirmo o meu pedido\".'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Outros métodos de pago'; $_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo o meu pedido'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Outros metodos de pago'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'este modulo permite aceptar pagamentos por transferencia bancaria'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Por favor,envíenos unha transferencia bancaria '; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Este módulo permítelle aceptar pagos seguros por transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Se o cliente decide pagar por transferencia bancaria, o estado da orde cambiará a \"En espera de pago\".'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Dito isto, debes confirmar manualmente o pedido ao recibir o transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'O teu pedido en %s completouse.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Envíanos unha transferencia bancaria con:'; $_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Cantidade'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'titular da conta bancaria'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'a este Banco'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Enviarémoslle un mail con esta informacion'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'O seu pedido será enviado tan pronto verifiquemos o pago'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Para calquera dúbida ou informacion adicional,contacte ca nosa '; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hemos observado un problema co seu pedido. si usted piensa que ha sido un erro,contacte con nós.'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Pagar mediante transferencia'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'soporte ao cliente'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Nome do propietario da conta:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Inclúe estes detalles:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Enderezo bancario:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Non esquezas inserir o teu número de pedido #%d no asunto da túa transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Non esquezas inserir a referencia do teu pedido %s no asunto da túa transferencia bancaria.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Observamos un problema co teu pedido. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'equipo experto de atención ao cliente'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Pagar por transferencia bancaria'; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(o procesamento do pedido será máis longo)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Aquí tes os datos bancarios para a túa transferencia:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Importe:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Propietario da conta:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Detalles da conta:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Enderezo bancario:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Aquí tes os datos bancarios para a túa transferencia:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Importe:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Propietario da conta:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Detalles da conta:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Enderezo bancario:'; diff --git a/modules/bankwire/translations/id.php b/modules/bankwire/translations/id.php index f14ba7a7a..0a65d4760 100644 --- a/modules/bankwire/translations/id.php +++ b/modules/bankwire/translations/id.php @@ -2,59 +2,60 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transfer Bank'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Terima pembayaran melalui transfer bank.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Informasi bank akan dihapus. Lanjutkan?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Rekening pemilik dan rincian harus dikonfigurasi untuk menggunakan modul ini dengan benar.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Mata uang belum diset '; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Detail account harus diisi.'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Pemilik akun harus diisi.'; -$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Seting berhasil diperbaharui'; -$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Bayar melalui transfer bank'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'detail kontak'; +$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'transfer uang antar bank'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Modul ini memungkinkan Anda menerima pembayaran pemesanan melalui transfer bank.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Apakah Anda yakin ingin menghapus detail ini?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Pemilik akun dan detail akun harus dikonfigurasi sebelum menggunakan modul ini.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Tidak ada mata uang yang ditetapkan untuk modul ini.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Detail akun diperlukan.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Pemilik akun wajib diisi.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Pengaturan diperbarui'; +$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Bayar melalui Transfer Bank'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Detail kontak'; $_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Pemilik akun'; $_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Detail'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Seperti Nama Bank, Nomor Akun dll.'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Alamat Bank'; -$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Simpan'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Seperti cabang bank, nomor IBAN, BIC, dll.'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Alamat bank'; +$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Menyimpan'; $_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Metode pembayaran ini tidak tersedia.'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Kembali ke halaman Checkout'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Pemeriksaan'; -$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Pembayaran via transfer'; -$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Ringkasan pembelian'; -$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Daftar belanja Anda kosong.'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Transfer Bank'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Anda memilih untuk membayar via transfer bank'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Uraian singkat pembelanjaan anda'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Jumlah total pembelian Anda'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(Termasuk pajak)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Kami menerima beberapa mata uang yang dapat digunakan di bank kami.'; -$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Pilih salah satu'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Mata uang yang kami terima:'; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Informasi bank dan no rekening akan tampil pada halaman selanjutnya.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Silahkan konfirmasi pembelian Anda dengan klik tombol "Konfirmasi order".'; -$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Konfirmasi pembelian'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Kembali ke Pembayaran'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Periksa'; +$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Pembayaran melalui bank'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Ringkasan pesanan'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Keranjang belanja anda kosong.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Anda telah memilih untuk membayar melalui transfer bank.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Berikut ringkasan singkat pesanan Anda:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Jumlah total pesanan Anda adalah'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(termasuk pajak)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Kami mengizinkan beberapa mata uang dikirim melalui transfer bank.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Pilih salah satu dari berikut ini:'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Kami mengizinkan mata uang berikut dikirim melalui transfer bank:'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Informasi rekening transfer bank akan ditampilkan di halaman berikutnya.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Silakan konfirmasi pesanan Anda dengan mengklik \"Saya konfirmasi pesanan saya\".'; $_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Metode pembayaran lainnya'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Modul ini untuk menerima pembayaran melalui transfer bank.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Jika pelanggan memilih membayar melalui transfer bank, status penjualan akan berubah menjadi \'Menunggu Pembayaran\''; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Oleh karena itu, Anda harus segera melakukan konfirmasi pembelian.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Pembelian Anda pada %s telah selesai.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Segera transfer'; +$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'saya mengkonfirmasi pesanan saya'; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Modul ini memungkinkan Anda menerima pembayaran aman melalui transfer bank.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Jika klien memilih untuk membayar melalui transfer bank, status pesanan akan berubah menjadi \'Menunggu Pembayaran\'.'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Oleh karena itu, Anda harus mengonfirmasi pesanan secara manual setelah menerima transfer bank.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Pesanan Anda di %s selesai.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Silakan kirim transfer bank kepada kami dengan:'; $_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Jumlah'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'Ke nomor rekening'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'dengan rincian'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'ke bank berikut'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Jangan lupa untuk mencantumkan nomor pembelian #%d di berita transfer.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Jangan lupa untuk mencantumkan referensi pembelian %s di berita transfer.'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Sebuah e-mail telah dikirimkan kepada Anda dengan informasi ini.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Barang Anda segera dikirim setelah pembayaran kami terima.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Bila ada pertanyaan atau informasi lainnya, hubungi kami'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'layanan pelanggan'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Kami menemukan masalah dengan order anda. Jika menurut anda, ini error silahkan kontak kami di'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Bayar via Transfer Bank'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(pembelian akan diproses lebih lama)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'Layanan Konsumen'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Nama pemilik akun:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Sertakan detail berikut:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Alamat bank:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Jangan lupa untuk memasukkan nomor pesanan Anda #%d di subjek transfer bank Anda.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Jangan lupa untuk memasukkan referensi pesanan Anda %s pada subjek transfer bank Anda.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Kami melihat ada masalah dengan pesanan Anda. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'tim dukungan pelanggan ahli'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Bayar melalui transfer bank'; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(pemrosesan pesanan akan lebih lama)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Berikut rincian bank untuk transfer Anda:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Jumlah:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Pemilik akun:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Detail akun:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Alamat bank:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Berikut rincian bank untuk transfer Anda:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Jumlah:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Pemilik akun:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Detail akun:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Alamat bank:'; diff --git a/modules/bankwire/translations/nl.php b/modules/bankwire/translations/nl.php index dceaf5b2a..309e19302 100644 --- a/modules/bankwire/translations/nl.php +++ b/modules/bankwire/translations/nl.php @@ -2,59 +2,60 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'Bankoverschrijving'; -$_MODULE['<{bankwire}prestashop>bankwire_a246a8e9907530c4c36b8b4c37bbc823'] = 'Accepteer bankoverschrijvingen voor uw producten.'; -$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Weet u zeker dat u uw gegevens wilt verwijderen?'; -$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Rekeninghouder en details moeten geconfigureerd worden om deze module correct te gebruiken.'; -$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Geen valuta gekozen voor deze module'; -$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Rekeninggegevens zijn verplicht.'; -$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Voer hier de naam van de rekeninghouder in.'; +$_MODULE['<{bankwire}prestashop>bankwire_05adcee99142c1a60fb38bb1330bbbc1'] = 'bankoverschrijving'; +$_MODULE['<{bankwire}prestashop>bankwire_cdff5a5ff19a38ed71f0f7cad47a9649'] = 'Met deze module kunt u betalingen voor boekingen via bankoverschrijving accepteren.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Weet u zeker dat u deze gegevens wilt verwijderen?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Accounteigenaar en accountgegevens moeten worden geconfigureerd voordat u deze module gebruikt.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Er is geen valuta ingesteld voor deze module.'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Accountgegevens zijn vereist.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Accounteigenaar is vereist.'; $_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Instellingen bijgewerkt'; -$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Betaal met overschrijving'; -$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Contactgegevens'; -$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Rekeninghouder'; +$_MODULE['<{bankwire}prestashop>bankwire_4ffaad55a1d22c453e7c9bad67b0598f'] = 'Betalen via bankoverschrijving'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Contact details'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Accounteigenaar'; $_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Details'; -$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Voer uw gegevens in, zoals het rekening-, IBAN- en BIC-nummer, etc.'; -$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Bankadres'; -$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Opslaan'; +$_MODULE['<{bankwire}prestashop>bankwire_6b154cafbab54ba3a1e76a78c290c02a'] = 'Zoals bankfiliaal, IBAN-nummer, BIC, etc.'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'bank adres'; +$_MODULE['<{bankwire}prestashop>bankwire_c9cc8cce247e49bae79f15173ce97354'] = 'Redden'; $_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Deze betaalmethode is niet beschikbaar.'; -$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Ga terug naar kassa'; -$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Afrekenen'; -$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Bankoverschrijving'; -$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Besteloverzicht'; +$_MODULE['<{bankwire}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Ga terug naar de kassa'; +$_MODULE['<{bankwire}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Uitchecken'; +$_MODULE['<{bankwire}prestashop>payment_execution_511e8b930b4d3d6002984c0373eb6d4b'] = 'Betaling via bankoverschrijving'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Overzicht van de bestelling'; $_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Uw winkelwagen is leeg.'; -$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'Bankoverschrijving'; -$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'U hebt ervoor gekozen om te betalen via overschrijving.'; -$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier ziet u een kort overzicht van uw bestelling:'; -$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Het totale bedrag van uw bestelling is'; -$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(incl. btw)'; -$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'We accepteren meerdere valuta bij een betaling via een bankoverschrijving.'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'U heeft ervoor gekozen om per bankoverschrijving te betalen.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier is een korte samenvatting van uw bestelling:'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'het totaalbedrag van je bestelling is'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(Incl. btw)'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'We staan ​​toe dat verschillende valuta via bankoverschrijving worden verzonden.'; $_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Kies een van de volgende:'; -$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Wij accepteren de volgende valuta bij een betaling via een overboeking: '; -$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Bankrekeninggegevens voor overboeking wordt weergegeven op de volgende pagina.'; -$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Klik op "Ik bevestig mijn bestelling" om uw bestelling te bevestigen.'; -$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Ik bevestig mijn bestelling'; -$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere betaalmethodes'; -$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Met deze module kunt u betalingen via bankoverschrijvingen ontvangen.'; -$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Indien een klant kiest om te betalen via bankoverschrijving, wordt de status van deze bestelling op "Wacht op betaling" gezet.'; -$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'U moet de bestelling handmatig bevestigen zodra de bankoverschrijving ontvangen is.'; -$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Uw bestelling op %s is compleet.'; -$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Gebruik de volgende betaalgegevens:'; -$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Bedrag'; -$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'naar de rekeninghouder van'; -$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'met deze details'; -$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'naar deze bank'; -$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Vergeet niet uw bestellingreferentie #%d in het onderwerpveld van uw bankoverschrijving te plaatsen.'; -$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Vergeet niet om uw bestelling referentie %s in het onderwerpveld van uw bankoverschrijving te plaatsen'; -$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Er is een e-mail met deze informatie naar u toegestuurd.'; -$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Uw bestelling wordt verzonden zodra we uw betaling hebben ontvangen.'; -$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Voor vragen of nadere informatie kunt u contact opnemen met onze'; -$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'klantenservice'; -$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'We hebben gemerkt dat er een probleem is met uw bestelling. Als u denkt dat dit een vergissing is kunt u contact opnemen met onze'; -$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Bankoverschrijving'; -$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(orderverwerking duurt langer)'; -$_MODULE['<{bankwire}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'klantenservice'; - - -return $_MODULE; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'We staan ​​toe dat de volgende valuta via bankoverschrijving worden verzonden:'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'De informatie over de bankoverschrijving wordt op de volgende pagina weergegeven.'; +$_MODULE['<{bankwire}prestashop>payment_execution_edd87c9059d88fea45c0bd6384ce92b9'] = 'Bevestig uw bestelling door op \"Ik bevestig mijn bestelling\" te klikken.'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere betalingsmethoden'; +$_MODULE['<{bankwire}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'ik bevestig mijn bestelling'; +$_MODULE['<{bankwire}prestashop>infos_c1be305030739396775edaca9813f77d'] = 'Met deze module kunt u veilig betalingen per bankoverschrijving accepteren.'; +$_MODULE['<{bankwire}prestashop>infos_60742d06006fde3043c77e6549d71a99'] = 'Als de klant ervoor kiest om per bankoverschrijving te betalen, verandert de status van de bestelling naar \'Wachten op betaling\'.'; +$_MODULE['<{bankwire}prestashop>infos_5fb4bbf993c23848433caf58e6b2816d'] = 'Dat gezegd hebbende, moet u de bestelling handmatig bevestigen nadat u de bankoverschrijving heeft ontvangen.'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Uw bestelling op %s is voltooid.'; +$_MODULE['<{bankwire}prestashop>payment_return_1552c5916ccfe019f35d91fd8955755e'] = 'Stuur ons een bankoverschrijving met:'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'Hoeveelheid'; +$_MODULE['<{bankwire}prestashop>payment_return_3d8051090c6882cce7a0b7277096c4e9'] = 'Naam accounteigenaar:'; +$_MODULE['<{bankwire}prestashop>payment_return_6ee99ea907235276684b74904df5ed90'] = 'Voeg deze details toe:'; +$_MODULE['<{bankwire}prestashop>payment_return_312d898d92d8ba90499ef0dac27270be'] = 'Bank adres:'; +$_MODULE['<{bankwire}prestashop>payment_return_bb4ec5aac6864a05fcc220cccd8e82f9'] = 'Vergeet niet uw bestelnummer #%d in het onderwerp van uw bankoverschrijving te vermelden.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'Vergeet niet uw bestelreferentie %s in het onderwerp van uw bankoverschrijving te plaatsen.'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'We hebben een probleem opgemerkt met uw bestelling. '; +$_MODULE['<{bankwire}prestashop>payment_return_66fcf4c223bbf4c7c886d4784e1f62e4'] = 'deskundig klantenondersteuningsteam'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Betaal per bankoverschrijving'; +$_MODULE['<{bankwire}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(orderverwerking zal langer duren)'; +$_MODULE['<{bankwire}prestashop>mail_template_html_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Hier zijn de bankgegevens voor uw overboeking:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Hoeveelheid:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_21e4851289ecc91b65023c2563344aa7'] = 'Accounteigenaar:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_20a650d87733bd5895c979de29864a73'] = 'Accountgegevens:'; +$_MODULE['<{bankwire}prestashop>mail_template_html_312d898d92d8ba90499ef0dac27270be'] = 'Bank adres:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_fc1ae3c1dd1d9d9a44da719fa9966f0e'] = 'Hier zijn de bankgegevens voor uw overboeking:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Hoeveelheid:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_21e4851289ecc91b65023c2563344aa7'] = 'Accounteigenaar:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_20a650d87733bd5895c979de29864a73'] = 'Accountgegevens:'; +$_MODULE['<{bankwire}prestashop>mail_template_text_312d898d92d8ba90499ef0dac27270be'] = 'Bank adres:'; diff --git a/modules/bankwire/views/templates/hook/payment_return.tpl b/modules/bankwire/views/templates/hook/payment_return.tpl index 8083fa911..1943a2471 100644 --- a/modules/bankwire/views/templates/hook/payment_return.tpl +++ b/modules/bankwire/views/templates/hook/payment_return.tpl @@ -25,16 +25,18 @@ {if $status == 'ok'}

    {l s='Your order on %s is complete.' sprintf=$shop_name mod='bankwire'}



    - {l s='Please send us a bank wire with' mod='bankwire'} +

    {l s='Please send us a bank wire with:' mod='bankwire'}


    - {l s='Amount' mod='bankwire'} {$total_to_pay} -

    - {l s='Name of account owner' mod='bankwire'} {if $bankwireOwner}{$bankwireOwner}{else}___________{/if} -

    - {l s='Include these details' mod='bankwire'} {if $bankwireDetails}{$bankwireDetails}{else}___________{/if} -

    - {l s='Bank name' mod='bankwire'} {if $bankwireAddress}{$bankwireAddress}{else}___________{/if} +

    - {l s='Name of account owner:' mod='bankwire'} {if $bankwireOwner}{$bankwireOwner}{else}___________{/if} +

    - {l s='Include these details:' mod='bankwire'} {if $bankwireDetails}{$bankwireDetails}{else}___________{/if} +

    - {l s='Bank address:' mod='bankwire'} {if $bankwireAddress}{$bankwireAddress}{else}___________{/if} +
    {if !isset($reference)} -
    - {l s='Do not forget to insert your order number #%d in the subject of your bank wire.' sprintf=$id_order mod='bankwire'} +

    {l s='Do not forget to insert your order number #%d in the subject of your bank wire.' sprintf=$id_order mod='bankwire'}

    {else} -
    - {l s='Do not forget to insert your order reference %s in the subject of your bank wire.' sprintf=$reference mod='bankwire'} +

    {l s='Do not forget to insert your order reference %s in the subject of your bank wire.' sprintf=$reference mod='bankwire'}

    {/if} +

    {else}

    diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 01bb0f3a4..c1cb4b1e7 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -404,7 +404,7 @@ var ajaxCart = { if (jsonData.avail_rooms == 0) { disableRoomTypeDemands(1); } - BookingForm.refresh(); + BookingForm.refresh(true); } if (pagename == 'category') { @@ -422,6 +422,13 @@ var ajaxCart = { $(callerElement).closest(".room_cont").hide(); } //$('#quantity_wanted_'+idProduct).val(1); + + let addRoomButton = $(callerElement).closest('.room_info_cont').find('.booking_guest_occupancy_conatiner .dropdown-menu .add_occupancy_block .add_new_occupancy_btn'); + if (jsonData.avail_rooms > 1) { + $(addRoomButton).removeClass('disabled'); + } else { + $(addRoomButton).addClass('disabled'); + } } @@ -471,30 +478,31 @@ var ajaxCart = { else $(callerElement).removeProp('disabled'); } - if (!addedFromProductPage) { - resetOccupancyField($(callerElement).closest('.booking_room_fields').find('.booking_occupancy_wrapper')); - } emptyCustomizations(); }, error: function(XMLHttpRequest, textStatus, errorThrown) { - var error = "Impossible to add the room to the cart.
    textStatus: '" + textStatus + "'
    errorThrown: '" + errorThrown + "'
    responseText:
    " + XMLHttpRequest.responseText; - if (!!$.prototype.fancybox) - $.fancybox.open([{ - type: 'inline', - autoScale: true, - minHeight: 30, - content: '

    ' + error + '

    ' - }], { - padding: 0 - }); - else - alert(error); - //reactive the button when adding has finished - if (addedFromProductPage) - $('#add_to_cart button').removeProp('disabled').removeClass('disabled'); - else - $(callerElement).removeProp('disabled'); + if (!onlineFlag) { + showErrorMessage(no_internet_txt); + } else { + var error = "Impossible to add the room to the cart.
    textStatus: '" + textStatus + "'
    errorThrown: '" + errorThrown + "'
    responseText:
    " + XMLHttpRequest.responseText; + if (!!$.prototype.fancybox) + $.fancybox.open([{ + type: 'inline', + autoScale: true, + minHeight: 30, + content: '

    ' + error + '

    ' + }], { + padding: 0 + }); + else + alert(error); + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart button').removeProp('disabled').removeClass('disabled'); + else + $(callerElement).removeProp('disabled'); + } } }); }, @@ -612,23 +620,27 @@ var ajaxCart = { }, error: function(XMLHttpRequest, textStatus, errorThrown) { - var error = "Impossible to add the room to the cart.
    textStatus: '" + textStatus + "'
    errorThrown: '" + errorThrown + "'
    responseText:
    " + XMLHttpRequest.responseText; - if (!!$.prototype.fancybox) - $.fancybox.open([{ - type: 'inline', - autoScale: true, - minHeight: 30, - content: '

    ' + error + '

    ' - }], { - padding: 0 - }); - else - alert(error); - //reactive the button when adding has finished - if (addedFromProductPage) - $('#add_to_cart button').removeProp('disabled').removeClass('disabled'); - else - $(callerElement).removeProp('disabled'); + if (!onlineFlag) { + showErrorMessage(no_internet_txt); + } else { + var error = "Impossible to add the room to the cart.
    textStatus: '" + textStatus + "'
    errorThrown: '" + errorThrown + "'
    responseText:
    " + XMLHttpRequest.responseText; + if (!!$.prototype.fancybox) + $.fancybox.open([{ + type: 'inline', + autoScale: true, + minHeight: 30, + content: '

    ' + error + '

    ' + }], { + padding: 0 + }); + else + alert(error); + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart button').removeProp('disabled').removeClass('disabled'); + else + $(callerElement).removeProp('disabled'); + } } }); }, @@ -664,6 +676,13 @@ var ajaxCart = { $('.room_cont[data-id-product="'+idProduct+'"]').find('.rm_left').hide(); } }); + + let addRoomButton = $('.room_cont[data-id-product="'+idProduct+'"]').find('.room_info_cont').find('.booking_guest_occupancy_conatiner .dropdown-menu .add_occupancy_block .add_new_occupancy_btn'); + if (jsonData.avail_rooms > 1) { + $(addRoomButton).removeClass('disabled'); + } else { + $(addRoomButton).addClass('disabled'); + } } if (pagename == 'orderopc') { location.reload(); @@ -676,18 +695,22 @@ var ajaxCart = { }*/ }, error: function() { - var error = 'ERROR: unable to delete the product'; - if (!!$.prototype.fancybox) { - $.fancybox.open([{ - type: 'inline', - autoScale: true, - minHeight: 30, - content: error - }], { - padding: 0 - }); - } else - alert(error); + if (!onlineFlag) { + showErrorMessage(no_internet_txt); + } else { + var error = 'ERROR: unable to delete the product'; + if (!!$.prototype.fancybox) { + $.fancybox.open([{ + type: 'inline', + autoScale: true, + minHeight: 30, + content: error + }], { + padding: 0 + }); + } else + alert(error); + } } }); }, @@ -855,21 +878,14 @@ var ajaxCart = { content += '' + name + ''; content += ''; - if (this.booking_product) { - content += '
    '; - content += '' + capacity_txt + ':'; - content += ' ' + this.bookingData.adults + ' ' + adults_txt + ' & ' + this.bookingData.children + ' ' + children_txt + '' - content += '
    '; - } - if (this.hasAttributes) content += ''; - if (typeof(freeProductTranslation) != 'undefined') { + if (typeof(freeProductTranslation) != 'undefined') { content += '
    '; content += 'Price:'; - content += ''; - content += (parseFloat(this.price_float) > 0 ? this.priceByLine : freeProductTranslation); + content += ' '; + content += formatCurrency(parseFloat(this.bookingData.total_room_type_amount), currency_format, currency_sign, currency_blank); content += ''; content += '
    '; } @@ -965,8 +981,8 @@ var ajaxCart = { if ($.trim($('dt[data-id="cart_block_product_' + domIdProduct + '"] .quantity').html()) != jsonProduct.quantity || $.trim($('dt[data-id="cart_block_product_' + domIdProduct + '"] .price').html()) != jsonProduct.priceByLine) { // Usual product if (!this.is_gift) { - $('dt[data-id="cart_block_product_' + domIdProduct + '"] .price').text(jsonProduct.priceByLine); - $('dt[data-id="cart_block_product_' + domIdProduct + '"] .price').attr('ttl_prod_price', jsonProduct.total_product_price); + $('dt[data-id="cart_block_product_' + domIdProduct + '"] .price').text(formatCurrency(parseFloat(this.bookingData.total_room_type_amount), currency_format, currency_sign, currency_blank)); + $('dt[data-id="cart_block_product_' + domIdProduct + '"] .price').attr('ttl_prod_price', this.bookingData.total_room_type_amount); } else $('dt[data-id="cart_block_product_' + domIdProduct + '"] .price').html(freeProductTranslation); diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index bbeb68201..bcb9ca6a5 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -78,9 +78,9 @@ {/if}
    {l s='Price' mod='blockcart'}: - + {if !isset($product.is_gift) || !$product.is_gift} - {if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if} + {displayWtPrice p="`$product.bookingData.total_room_type_amount`"}
    {hook h="displayProductPriceBlock" product=$product type="price" from="blockcart"}
    @@ -438,6 +438,7 @@ {addJsDefL name=duration_txt}{l s='Duration' mod='blockcart' js=1}{/addJsDefL} {addJsDefL name=capacity_txt}{l s='Capacity' mod='blockcart' js=1}{/addJsDefL} {addJsDefL name=remove_rm_title}{l s='Remove this room from my cart' mod='blockcart' js=1}{/addJsDefL} +{addJsDefL name=no_internet_txt}{l s='No internet. Please check your internet connection.' mod='blockcart' js=1}{/addJsDefL} {addJsDef rm_avail_process_lnk = $link->getModuleLink('blockcart', 'checkroomavailabilityajaxprocess')} {addJsDef pagename = $current_page} diff --git a/modules/blocknavigationmenu/views/templates/hook/wkFooterNavigationBlock.tpl b/modules/blocknavigationmenu/views/templates/hook/wkFooterNavigationBlock.tpl index 16aa20aa2..4f6b35ef2 100644 --- a/modules/blocknavigationmenu/views/templates/hook/wkFooterNavigationBlock.tpl +++ b/modules/blocknavigationmenu/views/templates/hook/wkFooterNavigationBlock.tpl @@ -32,6 +32,7 @@ {$navigationLink['name']} {/foreach} + {hook h="displayFooterExploreSectionHook"}
    diff --git a/modules/blocknewsletter/blocknewsletter.css b/modules/blocknewsletter/blocknewsletter.css index 8928dd158..46b2e74c1 100644 --- a/modules/blocknewsletter/blocknewsletter.css +++ b/modules/blocknewsletter/blocknewsletter.css @@ -1,56 +1,189 @@ /* Block newsletter */ -#newsletter_block_left { - padding:7px; - border:1px solid #ccc; - background:#eee; -} -#newsletter_block_left .title_block, #newsletter_block_left h4 { - padding:0 0 12px 28px; - color:#666; - text-shadow:0 1px 0 #fff; - background:url(img/icon/newsletter.png) no-repeat 0 0 transparent; -} -#newsletter_block_left p {padding:0;} +#columns #newsletter_block_left .form-group { + margin-bottom: 0; } + #columns #newsletter_block_left .form-group .form-control { + max-width: 222px; + display: inline-block; + margin-right: 6px; } + @media (min-width: 768px) and (max-width: 1199px) { + #columns #newsletter_block_left .form-group .form-control { + margin-bottom: 10px; + margin-right: 0; } } +#columns #newsletter_block_left .success_inline, #columns #newsletter_block_left .warning_inline { + text-align: left; + padding: 1px 0 0 0; + margin-bottom: -19px; } +#columns #newsletter_block_left .success_inline { + color: #418B19; } +#columns #newsletter_block_left .warning_inline { + color: #f13340; } -#newsletter_block_left p.success_inline { - color: #418B19; - text-align: center; - font-weight: bold; -} -#newsletter_block_left p.warning_inline { - color: #DA0F00; - text-align: center; - font-weight: bold; +/* Block newsletter footer */ +#footer #newsletter_block_left { + overflow: hidden; + /*width: 50%;*//*by webkul*/ + float: left; + padding: 13px 15px 7px 15px; + height: 70px;/*by webkul*/ + margin-bottom: 0; } + @media (max-width: 992px) { + #footer #newsletter_block_left { + height: 100px; } + #newsletter_block_left .block_content + { + width: 350px; + margin: 10px auto 0px; + }} + @media (max-width: 400px) { + #newsletter_block_left .block_content + { + width: 273px; + }} + @media (max-width: 767px) { + #footer #newsletter_block_left { + /*width: 100%;*/ + height: auto; } } + #footer #newsletter_block_left h4 { + background: none; + float: left; + padding: 7px 16px 5px 0; + text-transform: none; + font-size: 21px; + line-height: 25px; + border: none; } + #footer #newsletter_block_left h4:after { + display: none; } + #footer #newsletter_block_left .block_content { + overflow: hidden; } + #footer #newsletter_block_left .form-group { + margin-bottom: 0; } + #footer #newsletter_block_left .form-group .form-control { + height: 45px; + max-width: 267px; + background: #3c3c3c; + border-color: #515151; + color: #fff; + padding: 10px 43px 10px 12px; + display: inline-block; + float: left; } + @media (max-width: 400px) { + #footer #newsletter_block_left .form-group .form-control{ + padding: 7px 43px 7px 6px; + height: 37px; + } + } + #footer #newsletter_block_left .form-group .form-control:focus { + -moz-box-shadow: black 0px 0px 0px; + -webkit-box-shadow: black 0px 0px 0px; + box-shadow: black 0px 0px 0px; } + #footer #newsletter_block_left .form-group .button-small { + margin-left: -43px; + border: none; + background: none; + text-align: center; + color: #908f8f; + padding: 8px; } + #footer #newsletter_block_left .form-group .button-small:before { + content: "\f138"; + font-family: "FontAwesome"; + font-size: 28px; + line-height: 28px; } + #footer #newsletter_block_left .form-group .button-small:hover { + color: #fff !important; } + #footer #newsletter_block_left .form-group .button-small span { + display: none; } + #footer #newsletter_block_left .warning_inline { + display: block; + color: #f13340; + font-size: 13px; + line-height: 26px; + clear: both; } + @media (min-width: 1200px) { + #footer #newsletter_block_left .warning_inline { + display: inline-block; + position: relative; + top: -35px; + margin-bottom: -35px; + left: 15px; + clear: none; } } + #footer #newsletter_block_left .newsletter-input { + max-width: 230px !important; }/*by webkul original 300px*/ + @media (max-width: 400px) { + #footer #newsletter_block_left .newsletter-input { + max-width: 190px !important; + } + } + +#newsletter-input::-webkit-input-placeholder { + color: #bfbfbf; } -#newsletter_block_left input.inputNew { - position: relative; - top: -1px; - padding:0 5px; - height:20px; - width:148px; - border:1px solid #ccc; - border-right:none; - -moz-border-radius-topleft: 3px; - -moz-border-radius-bottomleft: 3px; - -webkit-border-radius-topleft: 3px; - -webkit-border-radius-bottomleft: 3px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - font-size:10px; - color:#999; +#newsletter-input:-moz-placeholder { /* Firefox 18- */ + color: #bfbfbf; } -*:first-child+html #newsletter_block_left input.inputNew {position:static;}/* hack ie 7 */ -#newsletter_block_left input.button_mini { - position:relative; - left:-2px; - height:23px; - width:24px; - border:0; - text-indent:-5000px; - background:url(img/bg_bt_newsletter_ok.png) no-repeat 0 0; - cursor:pointer +#newsletter-input::-moz-placeholder { /* Firefox 19+ */ + color: #bfbfbf; } -*:first-child+html #newsletter_block_left input.button_mini {padding-left:24px !important;}/* hack ie 7 */ +#newsletter-input:-ms-input-placeholder { + color: #bfbfbf; +} + +#blocknewsletter .message-block .alert { + position: relative; +} + +#blocknewsletter .message-block .alert.alert-dismissable .close { + position: absolute; + top: 0; + right: 0; + padding: 5px 10px; + opacity: 0.5; + color: #000; + text-shadow: none; +} + +#blocknewsletter .message-block .alert.alert-dismissable .close:hover { + color: #000; +} + +#blocknewsletter .loader { + margin-left: 10px; + position: relative; + top: 10px; +} + +#blocknewsletter .loader.loading { + display: inline-flex; + justify-content: center; +} + +#blocknewsletter .loader.loading::after { + content: ''; + width: 30px; + height: 30px; + border: 4px solid #dddddd; + border-top-color: transparent; + border-radius: 50%; + animation: loading 0.5s linear infinite; +} + +@-webkit-keyframes loading { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } +@-moz-keyframes loading { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } +@keyframes loading { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } + +/*# sourceMappingURL=blocknewsletter.css.map */ +.button.button-medium.newsletter-btn { + position: relative; + padding: 0px 20px; +} +#newsletter-input +{ + background-color: #3a3a3a; + border: 1px solid #868686; + color: #bfbfbf; + font-size: 13px; + height: 42px; + margin-bottom: 10px; +} diff --git a/modules/blocknewsletter/blocknewsletter.js b/modules/blocknewsletter/blocknewsletter.js index e69de29bb..90caf5352 100644 --- a/modules/blocknewsletter/blocknewsletter.js +++ b/modules/blocknewsletter/blocknewsletter.js @@ -0,0 +1,29 @@ +$(document).on('click', '#blocknewsletter .newsletter-btn', function (e) { + e.preventDefault(); + + $.ajax({ + url: url_newsletter_subscription, + type: 'POST', + dataType: 'JSON', + cache: false, + data: $(this).closest('form').serialize(), + beforeSend: function () { + let messageBlock = $('#blocknewsletter .message-block'); + $(messageBlock).fadeOut('fast'); + + $('#blocknewsletter .loader').show(); + }, + success: function (response) { + let messageBlock = $('#blocknewsletter .message-block'); + $(messageBlock).html(response.message_html).stop(true, true).fadeIn('fast'); + }, + error: function () { + if (!onlineFlag) { + showErrorMessage(no_internet_txt); + } + }, + complete: function () { + $('#blocknewsletter .loader').hide(); + } + }); +}); diff --git a/modules/blocknewsletter/blocknewsletter.php b/modules/blocknewsletter/blocknewsletter.php index 1bca820ef..a7a0612d6 100644 --- a/modules/blocknewsletter/blocknewsletter.php +++ b/modules/blocknewsletter/blocknewsletter.php @@ -35,6 +35,11 @@ class Blocknewsletter extends Module const GUEST_REGISTERED = 1; const CUSTOMER_REGISTERED = 2; + const EXPORT_ALL_SUBSCRIBERS = 1; + const EXPORT_SUBSCRIBERS_WITH_ACCOUNT = 2; + const EXPORT_SUBSCRIBERS_WITHOUT_ACCOUNT = 3; + const EXPORT_NON_SUBSCRIBERS = 4; + public function __construct() { $this->name = 'blocknewsletter'; @@ -50,6 +55,7 @@ class Blocknewsletter extends Module $this->description = $this->l('Adds a block for newsletter subscription.'); $this->confirmUninstall = $this->l('Are you sure that you want to delete all of your contacts?'); $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); + $this->secure_key = Tools::encrypt($this->name); $this->version = '2.2.2'; $this->author = 'PrestaShop'; @@ -63,9 +69,9 @@ class Blocknewsletter extends Module ) ); - $this->_searched_email = null; - $this->_html = ''; + + $this->hookPrepared = false; } public function registerHooks() @@ -107,7 +113,7 @@ class Blocknewsletter extends Module public function install() { - if (!parent::install() || !$this->registerHooks()) { + if (!parent::install() || !$this->registerHooks() || !$this->callInstallTab()) { return false; } Configuration::updateValue('NW_SALT', Tools::passwdGen(16)); @@ -126,206 +132,38 @@ class Blocknewsletter extends Module ); } - public function uninstall() + public function callInstallTab() { - Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'newsletter'); - return parent::uninstall(); + $result = $this->installTab('AdminParentNewsletter', 'Newsletter', false, true); + $result &= $this->installTab('AdminNewsletter', 'Configuration', 'AdminParentNewsletter', true); + + return $result; + } + + public function installTab($className, $tabName, $tabParentName = false, $hidden = false) + { + $tab = new Tab(); + $tab->active = 1; + $tab->class_name = $className; + $tab->name = array(); + foreach (Language::getLanguages(false) as $lang) { + $tab->name[$lang['id_lang']] = $tabName; + } + if ($tabParentName) { + $tab->id_parent = (int) Tab::getIdFromClassName($tabParentName); + } elseif ($hidden) { + $tab->id_parent = -1; + } else { + $tab->id_parent = 0; + } + $tab->module = $this->name; + + return $tab->add(); } public function getContent() { - if (Tools::isSubmit('submitUpdate')) { - Configuration::updateValue('NW_CONFIRMATION_EMAIL', (bool)Tools::getValue('NW_CONFIRMATION_EMAIL')); - Configuration::updateValue('NW_VERIFICATION_EMAIL', (bool)Tools::getValue('NW_VERIFICATION_EMAIL')); - - $voucher = Tools::getValue('NW_VOUCHER_CODE'); - if ($voucher && !Validate::isDiscountName($voucher)) { - $this->_html .= $this->displayError($this->l('The voucher code is invalid.')); - } else { - Configuration::updateValue('NW_VOUCHER_CODE', pSQL($voucher)); - $this->_html .= $this->displayConfirmation($this->l('Settings updated')); - } - } elseif (Tools::isSubmit('subscribedmerged')) { - $id = Tools::getValue('id'); - - if (preg_match('/(^N)/', $id)) { - $id = (int)substr($id, 1); - $sql = 'UPDATE '._DB_PREFIX_.'newsletter SET active = 0 WHERE id = '.$id; - Db::getInstance()->execute($sql); - } else { - $c = new Customer((int)$id); - $c->newsletter = (int)!$c->newsletter; - $c->update(); - } - Tools::redirectAdmin( - $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&conf=4&token='. - Tools::getAdminTokenLite('AdminModules') - ); - } elseif (Tools::isSubmit('exportSubscribers')) { - $header = array('id', 'shop_name', 'gender', 'lastname', 'firstname', 'email', 'subscribed', 'subscribed_on'); // TODO - $array_to_export = array_merge(array($header), $this->getSubscribers()); - - $file_name = time().'.csv'; - $fd = fopen($this->getLocalPath().$file_name, 'w+'); - foreach ($array_to_export as $tab) { - $line = implode(';', $tab); - $line .= "\n"; - fwrite($fd, $line, 4096); - } - fclose($fd); - Tools::redirect(_PS_BASE_URL_.__PS_BASE_URI__.'modules/'.$this->name.'/'.$file_name); - } elseif (Tools::isSubmit('exportOnlyBlockNews')) { - $array_to_export = $this->getBlockNewsletterSubscriber(); - - $file_name = time().'.csv'; - $fd = fopen($this->getLocalPath().$file_name, 'w+'); - foreach ($array_to_export as $tab) { - $line = implode(';', $tab); - $line .= "\n"; - fwrite($fd, $line, 4096); - } - fclose($fd); - Tools::redirect(_PS_BASE_URL_.__PS_BASE_URI__.'modules/'.$this->name.'/'.$file_name); - } elseif (Tools::isSubmit('searchEmail')) { - $this->_searched_email = Tools::getValue('searched_email'); - } - - $this->_html .= $this->renderForm(); - $this->_html .= $this->renderSearchForm(); - $this->_html .= $this->renderList(); - - $this->_html .= ''; - - $this->_html .= $this->renderExportForm(); - - return $this->_html; - } - - public function renderList() - { - $fields_list = array( - - 'id' => array( - 'title' => $this->l('ID'), - 'search' => false, - ), - 'shop_name' => array( - 'title' => $this->l('Shop'), - 'search' => false, - ), - 'gender' => array( - 'title' => $this->l('Gender'), - 'search' => false, - ), - 'lastname' => array( - 'title' => $this->l('Lastname'), - 'search' => false, - ), - 'firstname' => array( - 'title' => $this->l('Firstname'), - 'search' => false, - ), - 'email' => array( - 'title' => $this->l('Email'), - 'search' => false, - ), - 'subscribed' => array( - 'title' => $this->l('Subscribed'), - 'type' => 'bool', - 'active' => 'subscribed', - 'search' => false, - ), - 'newsletter_date_add' => array( - 'title' => $this->l('Subscribed on'), - 'type' => 'date', - 'search' => false, - ) - ); - - if (!Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) { - unset($fields_list['shop_name']); - } - - $helper_list = new HelperList(); - $helper_list->module = $this; - $helper_list->title = $this->l('Newsletter registrations'); - $helper_list->shopLinkType = ''; - $helper_list->no_link = true; - $helper_list->show_toolbar = true; - $helper_list->simple_header = false; - $helper_list->identifier = 'id'; - $helper_list->table = 'merged'; - $helper_list->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name; - $helper_list->token = Tools::getAdminTokenLite('AdminModules'); - $helper_list->actions = array('viewCustomer'); - $helper_list->toolbar_btn['export'] = array( - 'href' => $helper_list->currentIndex.'&exportSubscribers&token='.$helper_list->token, - 'desc' => $this->l('Export') - ); - - /* Before 1.6.0.7 displayEnableLink() could not be overridden in Module class - we declare another row action instead */ - if (version_compare(_PS_VERSION_, '1.6.0.7', '<')) { - unset($fields_list['subscribed']); - $helper_list->actions = array_merge($helper_list->actions, array('unsubscribe')); - } - - // This is needed for displayEnableLink to avoid code duplication - $this->_helperlist = $helper_list; - - /* Retrieve list data */ - $subscribers = $this->getSubscribers(); - $helper_list->listTotal = count($subscribers); - - /* Paginate the result */ - $page = ($page = Tools::getValue('submitFilter'.$helper_list->table)) ? $page : 1; - $pagination = ($pagination = Tools::getValue($helper_list->table.'_pagination')) ? $pagination : 50; - $subscribers = $this->paginateSubscribers($subscribers, $page, $pagination); - - return $helper_list->generateList($subscribers, $fields_list); - } - - public function displayViewCustomerLink($token = null, $id, $name = null) - { - $this->smarty->assign( - array( - 'href' => 'index.php?controller=AdminCustomers&id_customer='.(int)$id.'&updatecustomer&token='. - Tools::getAdminTokenLite('AdminCustomers'), - 'action' => $this->l('View'), - 'disable' => !((int)$id > 0), - ) - ); - return $this->display(__FILE__, 'views/templates/admin/list_action_viewcustomer.tpl'); - } - - public function displayEnableLink($token, $id, $value, $active, $id_category = null, $id_product = null, $ajax = false) - { - $this->smarty->assign( - array( - 'ajax' => $ajax, - 'enabled' => (bool)$value, - 'url_enable' => $this->_helperlist->currentIndex.'&'.$this->_helperlist->identifier.'='.$id.'&'.$active. - $this->_helperlist->table.($ajax ? '&action='.$active.$this->_helperlist->table.'&ajax='. - (int)$ajax : '').((int)$id_category && (int)$id_product ? '&id_category='.(int)$id_category : ''). - '&token='.$token - ) - ); - return $this->display(__FILE__, 'views/templates/admin/list_action_enable.tpl'); - } - - public function displayUnsubscribeLink($token = null, $id, $name = null) - { - $this->smarty->assign( - array( - 'href' => $this->_helperlist->currentIndex.'&subscribedcustomer&'.$this->_helperlist->identifier.'='. - $id.'&token='.$token, - 'action' => $this->l('Unsubscribe'), - ) - ); - return $this->display(__FILE__, 'views/templates/admin/list_action_unsubscribe.tpl'); + Tools::redirectAdmin($this->context->link->getAdminLink('AdminNewsletter')); } /** @@ -338,7 +176,7 @@ class Blocknewsletter extends Module * 1 = registered in block * 2 = registered in customer */ - protected function isNewsletterRegistered($customer_email) + public function isNewsletterRegistered($customer_email) { $sql = 'SELECT `email` FROM '._DB_PREFIX_.'newsletter @@ -368,14 +206,14 @@ class Blocknewsletter extends Module /** * Register in block newsletter */ - protected function newsletterRegistration() + public function newsletterRegistration() { if (empty($_POST['email']) || !Validate::isEmail($_POST['email'])) { return $this->error = $this->l('Invalid email address.'); } /* Unsubscription */ - elseif ($_POST['action'] == '1') { + elseif ($_POST['newsletter_action'] == '1') { $register_status = $this->isNewsletterRegistered($_POST['email']); if ($register_status < 1) { @@ -389,7 +227,7 @@ class Blocknewsletter extends Module return $this->valid = $this->l('Unsubscription successful.'); } /* Subscription */ - elseif ($_POST['action'] == '0') { + elseif ($_POST['newsletter_action'] == '0') { $register_status = $this->isNewsletterRegistered($_POST['email']); if ($register_status > 0) { return $this->error = $this->l('This email address is already registered.'); @@ -429,47 +267,55 @@ class Blocknewsletter extends Module } } - public function getSubscribers() + public function getExportCsvHeader() { - $dbquery = new DbQuery(); - $dbquery->select('c.`id_customer` AS `id`, s.`name` AS `shop_name`, gl.`name` AS `gender`, c.`lastname`, c.`firstname`, c.`email`, c.`newsletter` AS `subscribed`, c.`newsletter_date_add`'); - $dbquery->from('customer', 'c'); - $dbquery->leftJoin('shop', 's', 's.id_shop = c.id_shop'); - $dbquery->leftJoin('gender', 'g', 'g.id_gender = c.id_gender'); - $dbquery->leftJoin( - 'gender_lang', 'gl', 'g.id_gender = gl.id_gender AND gl.id_lang = '.(int)$this->context->employee->id_lang + return array( + $this->l('ID'), + $this->l('Social Title'), + $this->l('Email'), + $this->l('First Name'), + $this->l('Last Name'), + $this->l('Subscribed'), + $this->l('Date Added'), ); - $dbquery->where('c.`newsletter` = 1'); - if ($this->_searched_email) { - $dbquery->where('c.`email` LIKE \'%'.pSQL($this->_searched_email).'%\' '); - } - - $customers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($dbquery->build()); - - $dbquery = new DbQuery(); - $dbquery->select( - 'CONCAT(\'N\', n.`id`) AS `id`, s.`name` AS `shop_name`, NULL AS `gender`, NULL AS `lastname`, NULL - AS `firstname`, n.`email`, n.`active` AS `subscribed`, n.`newsletter_date_add`' - ); - $dbquery->from('newsletter', 'n'); - $dbquery->leftJoin('shop', 's', 's.id_shop = n.id_shop'); - $dbquery->where('n.`active` = 1'); - if ($this->_searched_email) { - $dbquery->where('n.`email` LIKE \'%'.pSQL($this->_searched_email).'%\' '); - } - - $non_customers = Db::getInstance()->executeS($dbquery->build()); - - $subscribers = array_merge($customers, $non_customers); - - return $subscribers; } - public function paginateSubscribers($subscribers, $page = 1, $pagination = 50) + public function getSubscribers($subscribersType) { - if (count($subscribers) > $pagination) { - $subscribers = array_slice($subscribers, $pagination * ($page - 1), $pagination); + $subscribers = array(); + + if (in_array( + $subscribersType, + array( + self::EXPORT_ALL_SUBSCRIBERS, + self::EXPORT_SUBSCRIBERS_WITH_ACCOUNT, + self::EXPORT_NON_SUBSCRIBERS, + ) + )) { + $sqlCustomer = 'SELECT c.`id_customer` AS id, gl.`name` AS gender, c.`email`, c.`firstname`, c.`lastname`, + c.`newsletter` AS subscribed, c.`newsletter_date_add` + FROM `'._DB_PREFIX_.'customer` c + LEFT JOIN '._DB_PREFIX_.'gender_lang gl ON (gl.`id_gender` = c.`id_gender` AND gl.`id_lang` = '.(int) $this->context->language->id.') + WHERE c.`newsletter` = '.($subscribersType == self::EXPORT_NON_SUBSCRIBERS ? '0' : '1'); + + $subscribers = array_merge($subscribers, Db::getInstance()->executeS($sqlCustomer)); } + + if (in_array( + $subscribersType, + array( + self::EXPORT_ALL_SUBSCRIBERS, + self::EXPORT_SUBSCRIBERS_WITHOUT_ACCOUNT, + self::EXPORT_NON_SUBSCRIBERS, + ) + )) { + $sqlNewsletter = 'SELECT CONCAT(\'N\', n.`id`) AS id, NULL AS id_gender, n.`email`, NULL AS firstname, + NULL AS lastname, n.`active` AS subscribed, n.`newsletter_date_add` + FROM `'._DB_PREFIX_.'newsletter` n WHERE n.`active` = '.($subscribersType == self::EXPORT_NON_SUBSCRIBERS ? '0' : '1'); + + $subscribers = array_merge($subscribers, Db::getInstance()->executeS($sqlNewsletter)); + } + return $subscribers; } @@ -509,13 +355,13 @@ class Blocknewsletter extends Module return false; } - protected function unregister($email, $register_status) + public function unregister($email, $register_status) { if ($register_status == self::GUEST_REGISTERED) { - $sql = 'DELETE FROM '._DB_PREFIX_.'newsletter WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '. + $sql = 'DELETE FROM '._DB_PREFIX_.'newsletter WHERE `email` = \''.pSQL($email).'\' AND id_shop = '. $this->context->shop->id; } elseif ($register_status == self::CUSTOMER_REGISTERED) { - $sql = 'UPDATE '._DB_PREFIX_.'customer SET `newsletter` = 0 WHERE `email` = \''.pSQL($_POST['email']). + $sql = 'UPDATE '._DB_PREFIX_.'customer SET `newsletter` = 0 WHERE `email` = \''.pSQL($email). '\' AND id_shop = '.$this->context->shop->id; } @@ -649,6 +495,7 @@ class Blocknewsletter extends Module */ public function confirmEmail($token) { + $errors = array(); $activated = false; if ($email = $this->getGuestEmailByToken($token)) { @@ -658,18 +505,20 @@ class Blocknewsletter extends Module } if (!$activated) { - return $this->l('This email is already registered and/or invalid.'); + $errors[] = $this->l('This email is already registered and/or invalid.'); } - if ($discount = Configuration::get('NW_VOUCHER_CODE')) { - $this->sendVoucher($email, $discount); + if (!count($errors)) { + if ($discount = Configuration::get('NW_VOUCHER_CODE')) { + $this->sendVoucher($email, $discount); + } + + if (Configuration::get('NW_CONFIRMATION_EMAIL')) { + $this->sendConfirmationEmail($email); + } } - if (Configuration::get('NW_CONFIRMATION_EMAIL')) { - $this->sendConfirmationEmail($email); - } - - return $this->l('Thank you for subscribing to our newsletter.'); + return $errors; } /** @@ -744,38 +593,25 @@ class Blocknewsletter extends Module protected function _prepareHook($params) { - if (Tools::isSubmit('submitNewsletter')) { - $this->newsletterRegistration(); - if ($this->error) { - $this->smarty->assign( - array( - 'color' => 'red', - 'msg' => $this->error, - 'nw_value' => isset($_POST['email']) ? pSQL($_POST['email']) : false, - 'nw_error' => true, - 'action' => $_POST['action'] - ) - ); - } elseif ($this->valid) { - $this->smarty->assign( - array( - 'color' => 'green', - 'msg' => $this->valid, - 'nw_error' => false - ) - ); - } + if (!$this->hookPrepared) { + $this->context->smarty->assign(array( + 'csrf_token' => $this->secure_key, + )); + + Media::addJsDef(array( + 'url_newsletter_subscription' => $this->context->link->getModuleLink($this->name, 'subscription'), + )); + + $this->hookPrepared = true; } - $this->smarty->assign('this_path', $this->_path); } public function hookDisplayLeftColumn($params) { - if (!isset($this->prepared) || !$this->prepared) { - $this->_prepareHook($params); - } - $this->prepared = true; + $this->_prepareHook($params); + $this->smarty->assign(array('id_module' => $this->id)); + return $this->display(__FILE__, 'blocknewsletter.tpl'); } @@ -824,179 +660,39 @@ class Blocknewsletter extends Module return true; } - public function renderForm() + public function reset() { - $fields_form = array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Settings'), - 'icon' => 'icon-cogs' - ), - 'input' => array( - array( - 'type' => 'switch', - 'label' => $this->l('Would you like to send a verification email after subscription?'), - 'name' => 'NW_VERIFICATION_EMAIL', - 'values' => array( - array( - 'id' => 'active_on', - 'value' => 1, - 'label' => $this->l('Yes') - ), - array( - 'id' => 'active_off', - 'value' => 0, - 'label' => $this->l('No') - ) - ), - ), - array( - 'type' => 'switch', - 'label' => $this->l('Would you like to send a confirmation email after subscription?'), - 'name' => 'NW_CONFIRMATION_EMAIL', - 'values' => array( - array( - 'id' => 'active_on', - 'value' => 1, - 'label' => $this->l('Yes') - ), - array( - 'id' => 'active_off', - 'value' => 0, - 'label' => $this->l('No') - ) - ), - ), - array( - 'type' => 'text', - 'label' => $this->l('Welcome voucher code'), - 'name' => 'NW_VOUCHER_CODE', - 'class' => 'fixed-width-md', - 'desc' => $this->l('Leave blank to disable by default.') - ), - ), - 'submit' => array( - 'title' => $this->l('Save'), - ) - ), - ); - - $helper = new HelperForm(); - $helper->show_toolbar = false; - $helper->table = $this->table; - $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); - $helper->default_form_language = $lang->id; - $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; - $helper->identifier = $this->identifier; - $helper->submit_action = 'submitUpdate'; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; - $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->tpl_vars = array( - 'fields_value' => $this->getConfigFieldsValues(), - 'languages' => $this->context->controller->getLanguages(), - 'id_language' => $this->context->language->id - ); - - return $helper->generateForm(array($fields_form)); - } - - public function renderExportForm() - { - $fields_form = array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Export Newsletter Subscribers'), - 'icon' => 'icon-envelope' - ), - 'description' => $this->l('Generate a .CSV file based on Newsletter subscribers data. Only subscribers without an account on your website will be exported.'), - 'submit' => array( - 'title' => $this->l('Export .CSV file'), - 'class' => 'btn btn-default pull-right', - 'name' => 'submitExportmodule', - ) - ), - ); - - $helper = new HelperForm(); - $helper->table = $this->table; - $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); - $helper->default_form_language = $lang->id; - $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; - $helper->identifier = $this->identifier; - $helper->submit_action = 'exportOnlyBlockNews'; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; - $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->tpl_vars = array( - 'fields_value' => $this->getConfigFieldsValues(), - 'languages' => $this->context->controller->getLanguages(), - 'id_language' => $this->context->language->id - ); - return $helper->generateForm(array($fields_form)); - } - - public function renderSearchForm() - { - $fields_form = array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Search for addresses'), - 'icon' => 'icon-search' - ), - 'input' => array( - array( - 'type' => 'text', - 'label' => $this->l('Email address to search'), - 'name' => 'searched_email', - 'class' => 'fixed-width-xxl', - 'desc' => $this->l('Example: contact@qloapps.com or @qloapps.com') - ), - ), - 'submit' => array( - 'title' => $this->l('Search'), - 'icon' => 'process-icon-refresh', - ) - ), - ); - - $helper = new HelperForm(); - $helper->table = $this->table; - $helper->identifier = $this->identifier; - $helper->submit_action = 'searchEmail'; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; - $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->tpl_vars = array( - 'fields_value' => array('searched_email' => $this->_searched_email), - 'languages' => $this->context->controller->getLanguages(), - 'id_language' => $this->context->language->id - ); - - return $helper->generateForm(array($fields_form)); - } - - public function getConfigFieldsValues() - { - return array( - 'NW_VERIFICATION_EMAIL' => Tools::getValue('NW_VERIFICATION_EMAIL', Configuration::get('NW_VERIFICATION_EMAIL')), - 'NW_CONFIRMATION_EMAIL' => Tools::getValue('NW_CONFIRMATION_EMAIL', Configuration::get('NW_CONFIRMATION_EMAIL')), - 'NW_VOUCHER_CODE' => Tools::getValue('NW_VOUCHER_CODE', Configuration::get('NW_VOUCHER_CODE')), - ); - } - - public function getBlockNewsletterSubscriber() - { - $rq_sql = 'SELECT `id`, `email`, `newsletter_date_add`, `ip_registration_newsletter` - FROM `'._DB_PREFIX_.'newsletter` - WHERE `active` = 1'; - - if (Context::getContext()->cookie->shopContext) { - $rq_sql .= ' AND `id_shop` = '.(int)Context::getContext()->shop->id; + if (!$this->uninstall(false)) { + return false; + } + if (!$this->install(false)) { + return false; } - $rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($rq_sql); + return true; + } - $header = array('id_customer', 'email', 'newsletter_date_add', 'ip_address', 'http_referer'); - $result = (is_array($rq) ? array_merge(array($header), $rq) : $header); + public function uninstall($keep = true) + { + if (!parent::uninstall() + || ($keep && !Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'newsletter')) + || !$this->uninstallTab() + ) { + return false; + } - return $result; + return true; + } + + public function uninstallTab() + { + $moduleTabs = Tab::getCollectionFromModule($this->name); + if (!empty($moduleTabs)) { + foreach ($moduleTabs as $moduleTab) { + $moduleTab->delete(); + } + } + + return true; } } diff --git a/modules/blocknewsletter/controllers/admin/AdminNewsletterController.php b/modules/blocknewsletter/controllers/admin/AdminNewsletterController.php new file mode 100644 index 000000000..2e19512ad --- /dev/null +++ b/modules/blocknewsletter/controllers/admin/AdminNewsletterController.php @@ -0,0 +1,637 @@ +bootstrap = true; + $this->table = 'merged'; + $this->identifier = 'id_merged'; + $this->allow_export = true; + + $this->_filterCustomer = ''; + $this->_filterNewsletter = ''; + + parent::__construct(); + + $this->addRowAction('viewCustomer'); + $this->addRowAction('delete'); + + $genderList = array(); + $genders = Gender::getGenders($this->context->language->id); + foreach ($genders as $gender) { + $genderList[$gender->id_gender] = $gender->name; + } + + $this->fields_list = array( + 'id_merged' => array( + 'title' => $this->l('ID'), + 'filter_type' => 'int', + 'filter_keys' => array( + 'customer' => 'c.`id_customer`', + 'newsletter' => 'n.`id`', + ), + ), + 'id_gender' => array( + 'title' => $this->l('Social Title'), + 'type' => 'select', + 'list' => $genderList, + 'filter_type' => 'int', + 'filter_key' => 'id_gender', + 'filter_keys' => array( + 'customer' => 'c.`id_gender`', + ), + ), + 'firstname' => array( + 'title' => $this->l('First Name'), + 'filter_keys' => array( + 'customer' => 'c.`firstname`', + ), + ), + 'lastname' => array( + 'title' => $this->l('Last Name'), + 'filter_keys' => array( + 'customer' => 'c.`lastname`', + ), + ), + 'email' => array( + 'title' => $this->l('Email'), + 'filter_keys' => array( + 'customer' => 'c.`email`', + 'newsletter' => 'n.`email`', + ), + ), + 'subscribed' => array( + 'title' => $this->l('Subscribed'), + 'type' => 'bool', + 'active' => 'subscribed', + 'filter_keys' => array( + 'customer' => 'c.`newsletter`', + 'newsletter' => 'n.`active`', + ), + 'ajax' => true, + 'search' => false, + 'orderby' => false, + ), + 'newsletter_date_add' => array( + 'title' => $this->l('Subscribed On'), + 'type' => 'datetime', + 'filter_keys' => array( + 'customer' => 'c.`newsletter_date_add`', + 'newsletter' => 'n.`newsletter_date_add`', + ), + ), + ); + + $this->list_no_link = true; + + $this->bulk_actions = array( + 'divider' => array( + 'text' => 'divider' + ), + 'delete' => array( + 'text' => $this->l('Delete selected'), + 'confirm' => $this->l('Delete selected items?'), + 'icon' => 'icon-trash' + ) + ); + + $this->_conf[101] = $this->l('The customer has been unsubscribed from newsletter successfully.'); + $this->_conf[102] = $this->l('The selection has been unsubscribed from newsletter successfully.'); + } + + public function displayEnableLink($token, $id, $value, $active, $id_category = null, $id_product = null) + { + $tpl = $this->context->smarty->createTemplate( + $this->module->getTemplatePath( + '/views/templates/admin/'.$this->tpl_folder.'/helpers/list/list_action_enable.tpl' + ) + ); + + $tpl->assign(array( + 'enabled' => (bool) $value, + 'url_enable' => self::$currentIndex.'&action=unsubscribeNewsletter&'.$this->identifier.'='.$id. + '&token='.($token != null ? $token : $this->token), + )); + + return $tpl->fetch(); + } + + public function displayViewCustomerLink($token = null, $id, $name = null) + { + if (Customer::customerIdExistsStatic($id)) { + $tpl = $this->context->smarty->createTemplate( + $this->module->getTemplatePath( + '/views/templates/admin/'.$this->tpl_folder.'/helpers/list/view-customer-link.tpl' + ) + ); + + $tpl->assign(array( + 'id_merged' => $id, + 'disabled' => !Validate::isUnsignedInt($id), + )); + + return $tpl->fetch(); + } else { + $this->addRowActionSkipList('viewCustomer', $id); + } + } + + public function initToolbar() + { + parent::initToolbar(); + + unset($this->toolbar_btn['save']); + $this->toolbar_btn['export'] = array( + 'href' => self::$currentIndex.'&export'.$this->table.'&token='.$this->token, + 'desc' => $this->l('Export') + ); + } + + public function initToolbarTitle() + { + $this->toolbar_title = $this->l('Configuration'); + } + + public function initContent() + { + parent::initContent(); + + if ($this->display == 'options') { + $this->content = $this->renderOptions(); + $this->content .= $this->renderList(); + $this->content .= $this->renderFormExport(); + $this->context->smarty->assign(array('content' => $this->content)); + + unset($this->toolbar_btn['save']); + } + } + + public function renderOptions() + { + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Configuration'), + 'icon' => 'icon-cogs', + 'fields' => array( + 'NW_VERIFICATION_EMAIL' => array( + 'type' => 'bool', + 'title' => $this->l('Would you like to send a verification email after subscription?'), + 'validation' => 'isBool', + 'cast' => 'intval', + ), + 'NW_CONFIRMATION_EMAIL' => array( + 'type' => 'bool', + 'title' => $this->l('Would you like to send a confirmation email after subscription?'), + 'validation' => 'isBool', + 'cast' => 'intval', + ), + 'NW_VOUCHER_CODE' => array( + 'type' => 'text', + 'title' => $this->l('Welcome voucher code'), + 'desc' => sprintf( + $this->l('You can create a voucher from %s page. Leave blank to disable this feature.'), + ''.$this->l('Cart Rules').'' + ), + 'class' => 'fixed-width-xl', + 'validation' => 'isUnsignedInt', + 'required' => true, + 'cast' => 'intval', + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'name' => 'submitNewsletterOptions', + ) + ), + ); + + return parent::renderOptions(); + } + + public function renderList() + { + $this->tpl_list_vars['title'] = $this->l('Subscribers'); + $this->tpl_list_vars['icon'] = 'icon-list'; + + return parent::renderList(); + } + + public function renderFormExport() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Export Email Addresses'), + 'icon' => 'icon-share-alt' + ), + 'description' => $this->l('Use this option to export list of email addresses as a .CSV file.'), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Newsletter subscribers'), + 'name' => 'subscribersType', + 'class' => 'fixed-width-xl', + 'options' => array( + 'query' => array( + array( + 'id' => Blocknewsletter::EXPORT_ALL_SUBSCRIBERS, + 'name' => $this->l('All subscribers'), + ), + array( + 'id' => Blocknewsletter::EXPORT_SUBSCRIBERS_WITH_ACCOUNT, + 'name' => $this->l('Subscribers with account'), + ), + array( + 'id' => Blocknewsletter::EXPORT_SUBSCRIBERS_WITHOUT_ACCOUNT, + 'name' => $this->l('Subscribers without account'), + ), + array( + 'id' => Blocknewsletter::EXPORT_NON_SUBSCRIBERS, + 'name' => $this->l('Non-subscribers'), + ), + ), + 'id' => 'id', + 'name' => 'name' + ), + 'desc' => $this->l('Filter customers who have subscribed to the newsletter or not, and who have an account or not.'), + ), + ), + 'submit' => array( + 'title' => $this->l('Export .CSV file'), + 'icon' => 'process-icon- icon-share-alt', + 'id' => 'submit-export-email-addresses', + 'name' => 'submitExportEmailAddresses', + ), + ); + + return parent::renderForm(); + } + + public function postProcess() + { + if (Tools::isSubmit('submitNewsletterOptions')) { + $voucherCode = Tools::getValue('NW_VOUCHER_CODE'); + if (Tools::strlen($voucherCode) > 0) { + if (!Validate::isDiscountName($voucherCode)) { + $this->errors[] = $this->l('The voucher code is invalid.'); + } elseif (!CartRule::cartRuleExists($voucherCode)) { + $this->errors[] = $this->l('The voucher code does not exist.'); + } + } + + if (!count($this->errors)) { + Configuration::updateValue('NW_VERIFICATION_EMAIL', Tools::getValue('NW_VERIFICATION_EMAIL')); + Configuration::updateValue('NW_CONFIRMATION_EMAIL', Tools::getValue('NW_CONFIRMATION_EMAIL')); + Configuration::updateValue('NW_VOUCHER_CODE', $voucherCode); + + Tools::redirectAdmin(self::$currentIndex.'&conf=6&token='.$this->token); + } + } elseif (Tools::isSubmit('submitExportEmailAddresses')) { + $subscribersType = Tools::getValue('subscribersType'); + $subscribers = $this->module->getSubscribers($subscribersType); + + if (count($subscribers)) { + array_unshift($subscribers, $this->module->getExportCsvHeader()); + + $fileName = 'newsletter_emails_'.date('YmdHis').'.csv'; + $filePath = $this->module->getLocalPath().'export/'.$fileName; + + $fileHandle = fopen($filePath, 'w+'); + foreach ($subscribers as $subscriber) { + fputcsv($fileHandle, $subscriber); + } + + if (Tools::file_exists_cache($filePath)) { + if (ob_get_level() && ob_get_length() > 0) { + ob_end_clean(); + } + + header('Content-Type: text/csv'); + header('Content-Type: application/force-download; charset=UTF-8'); + header('Cache-Control: no-store, no-cache'); + header('Content-Disposition: attachment; filename="'.$fileName.'"'); + + @set_time_limit(0); + readfile($filePath); + exit; + } + } else { + $this->errors[] = $this->l('No email addresses found to export.'); + } + } + + parent::postProcess(); + } + + private function unsubscribeNewsletter($idMerged) + { + $result = false; + $email = ''; + if (preg_match('/(^N)/', $idMerged)) { + $idMerged = (int) substr($idMerged, 1); + $email = Db::getInstance()->getValue( + 'SELECT n.`email` + FROM `'._DB_PREFIX_.'newsletter` n + WHERE n.`id` = '.(int) $idMerged + ); + } else { + $objCustomer = new Customer($idMerged); + if (Validate::isLoadedObject($objCustomer)) { + $email = $objCustomer->email; + } else { + $this->errors[] = $this->l('Customer object can not be loaded.'); + } + } + + if ($email && !count($this->errors)) { + $registrationStatus = $this->module->isNewsletterRegistered($email); + + if ($registrationStatus < 1) { + $this->errors[] = $this->l('This email address is not registered.'); + } + + if (!($result = $this->module->unregister($email, $registrationStatus))) { + $this->errors[] = $this->l('An error occurred while attempting to unsubscribe.'); + } + } + + return $result; + } + + public function processUnsubscribeNewsletter() + { + $idMerged = Tools::getValue('id_merged'); + + if ($this->unsubscribeNewsletter($idMerged)) { + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&conf=101'); + } else { + $this->errors[] = $this->l('Newsletter unsubscription failed. Please try again.'); + } + } + + public function processDelete() + { + $idMerged = Tools::getValue('id_merged'); + + if ($this->unsubscribeNewsletter($idMerged)) { + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&conf=101'); + } else { + $this->errors[] = $this->l('Newsletter unsubscription failed. Please try again.'); + } + } + + public function processBulkDelete() + { + $result = true; + if (is_array($this->boxes) && !empty($this->boxes)) { + foreach ($this->boxes as $idMerged) { + $deleteOk = $this->unsubscribeNewsletter($idMerged); + $result &= $deleteOk; + + if (!$deleteOk) { + $this->errors[] = sprintf($this->l('Can\'t delete #%d'), $idMerged); + } + } + + if ($result) { + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&conf=2'); + } else { + $this->errors[] = $this->l('Something went wrong. Please try again.'); + } + } else { + $this->errors[] = $this->l('You must select at least one element to delete.'); + } + } + + public function getList( + $id_lang, + $orderBy = null, + $orderWay = null, + $start = 0, + $limit = null, + $idLangShop = false + ) { + $useLimit = true; + if ($limit === false) { + $useLimit = false; + } elseif (empty($limit)) { + if (isset($this->context->cookie->{$this->list_id.'_pagination'}) && $this->context->cookie->{$this->list_id.'_pagination'}) { + $limit = $this->context->cookie->{$this->list_id.'_pagination'}; + } else { + $limit = $this->_default_pagination; + } + } + + $prefix = 'newsletter'; + if (empty($orderBy)) { + if ($this->context->cookie->{$prefix.$this->list_id.'Orderby'}) { + $orderBy = $this->context->cookie->{$prefix.$this->list_id.'Orderby'}; + } elseif ($this->_orderBy) { + $orderBy = $this->_orderBy; + } else { + $orderBy = $this->_defaultOrderBy; + } + } + + if (empty($orderWay)) { + if ($this->context->cookie->{$prefix.$this->list_id.'Orderway'}) { + $orderWay = $this->context->cookie->{$prefix.$this->list_id.'Orderway'}; + } elseif ($this->_orderWay) { + $orderWay = $this->_orderWay; + } else { + $orderWay = $this->_defaultOrderWay; + } + } + + $sqlWhere = ''; + do { + $sqlWhere = ' '.(isset($this->_where) ? $this->_where.' ' : ''). + ($this->deleted ? 'AND a.`deleted` = 0 ' : ''). + (isset($this->_filter) ? $this->_filter : ''). + (isset($this->_group) ? $this->_group.' ' : ''); + + $this->_orderBy = $orderBy; + $this->_orderWay = $orderWay = Tools::strtoupper($orderWay); + + $sqlOrderBy = ' ORDER BY '.$orderBy.' '.pSQL($orderWay); + $sqlLimit = ' '.(($useLimit === true) ? ' LIMIT '.(int) $start.', '.(int) $limit : ''); + + $this->_listsql = 'SELECT c.`id_customer` AS id_merged, gl.`name` AS id_gender, c.`email`, c.`firstname`, c.`lastname`, c.`newsletter` AS subscribed, c.`newsletter_date_add` + FROM `'._DB_PREFIX_.'customer` c + LEFT JOIN '._DB_PREFIX_.'gender_lang gl ON (gl.`id_gender` = c.`id_gender` AND gl.`id_lang` = '.(int) $this->context->language->id.') + WHERE c.`newsletter` = 1 '.$this->_filterCustomer.' + UNION + SELECT CONCAT(\'N\', n.`id`) AS id_merged, NULL AS id_gender, n.`email`, NULL AS firstname, NULL AS lastname, n.`active` AS subscribed, n.`newsletter_date_add` + FROM `'._DB_PREFIX_.'newsletter` n WHERE n.`active` = 1 '.$this->_filterNewsletter.$sqlOrderBy; + + $listCount = 'SELECT FOUND_ROWS() AS `'._DB_PREFIX_.$this->table.'`'; + + $this->_list = Db::getInstance()->executeS($this->_listsql, true, false); + + if ($this->_list === false) { + $this->_list_error = Db::getInstance()->getMsgError(); + break; + } + + $this->_listTotal = Db::getInstance()->getValue($listCount, false); + + if ($useLimit === true) { + $start = (int) $start - (int) $limit; + if ($start < 0) { + break; + } + } else { + break; + } + } while (empty($this->_list)); + + Hook::exec('action'.$this->controller_name.'ListingResultsModifier', array( + 'list' => &$this->_list, + 'list_total' => &$this->_listTotal, + )); + } + + public function processFilter() + { + Hook::exec('action'.$this->controller_name.'ListingFieldsModifier', array( + 'fields' => &$this->fields_list, + )); + + $this->ensureListIdDefinition(); + + $prefix = $this->getCookieFilterPrefix(); + + if (isset($this->list_id)) { + foreach ($_POST as $key => $value) { + if ($value === '') { + unset($this->context->cookie->{$prefix.$key}); + } elseif (stripos($key, $this->list_id.'Filter_') === 0) { + $this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : json_encode($value); + } elseif (stripos($key, 'submitFilter') === 0) { + $this->context->cookie->$key = !is_array($value) ? $value : json_encode($value); + } + } + + foreach ($_GET as $key => $value) { + if (stripos($key, $this->list_id.'Filter_') === 0) { + $this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : json_encode($value); + } elseif (stripos($key, 'submitFilter') === 0) { + $this->context->cookie->$key = !is_array($value) ? $value : json_encode($value); + } + if (stripos($key, $this->list_id.'Orderby') === 0 && Validate::isOrderBy($value)) { + if ($value === '' || $value == $this->_defaultOrderBy) { + unset($this->context->cookie->{$prefix.$key}); + } else { + $this->context->cookie->{$prefix.$key} = $value; + } + } elseif (stripos($key, $this->list_id.'Orderway') === 0 && Validate::isOrderWay($value)) { + if ($value === '' || $value == $this->_defaultOrderWay) { + unset($this->context->cookie->{$prefix.$key}); + } else { + $this->context->cookie->{$prefix.$key} = $value; + } + } + } + } + + $filters = $this->context->cookie->getFamily($prefix.$this->list_id.'Filter_'); + foreach ($filters as $key => $value) { + if ($value != null && !strncmp($key, $prefix.$this->list_id.'Filter_', 7 + Tools::strlen($prefix.$this->list_id))) { + $key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->list_id)); + + if (!array_key_exists($key, $this->fields_list)) { + continue; + } + + $field = $this->fields_list[$key]; + foreach ($field['filter_keys'] as $table => $filterKey) { + $key = $filterKey; + + $type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false)); + if (($type == 'date' || $type == 'datetime' || $type == 'range') && is_string($value)) { + $value = json_decode($value, true); + } + + $sqlFilter = ''; + // only for date filtering (from, to) + if (is_array($value)) { + if ($type == 'range') { + if (isset($value[0]) && !empty($value[0])) { + if (!Validate::isUnsignedInt($value[0])) { + $this->errors[] = Tools::displayError('The \'From\' value is invalid'); + } else { + $sqlFilter .= ' AND '.pSQL($key).' >= '.pSQL($value[0]); + } + } + if (isset($value[1]) && !empty($value[1])) { + if (!Validate::isUnsignedInt($value[1])) { + $this->errors[] = Tools::displayError('The \'From\' value is invalid'); + } elseif (isset($value[0]) && !empty($value[0]) && $value[0] > $value[1]) { + $this->errors[] = Tools::displayError('The \'To\' value cannot be less than from value'); + } else { + $sqlFilter .= ' AND '.pSQL($key).' <= '.pSQL($value[1]); + } + } + } else { + if (isset($value[0]) && !empty($value[0])) { + if (!Validate::isDate($value[0])) { + $this->errors[] = Tools::displayError('The \'From\' date format is invalid (YYYY-MM-DD)'); + } else { + $sqlFilter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\''; + } + } + + if (isset($value[1]) && !empty($value[1])) { + if (!Validate::isDate($value[1])) { + $this->errors[] = Tools::displayError('The \'To\' date format is invalid (YYYY-MM-DD)'); + } elseif (isset($value[0]) && !empty($value[0]) && strtotime($value[0]) > strtotime($value[1])) { + $this->errors[] = Tools::displayError('The \'To\' date cannot be before than from date'); + } else { + $sqlFilter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\''; + } + } + } + } else { + $sqlFilter .= ' AND '; + if ($type == 'int' || $type == 'bool') { + $sqlFilter .= pSQL($key).' = '.(int) $value.' '; + } elseif ($type == 'decimal') { + $sqlFilter .= pSQL($key).' = '.(float) $value.' '; + } elseif ($type == 'select') { + $sqlFilter .= pSQL($key).' = \''.pSQL($value).'\' '; + } elseif ($type == 'price') { + $value = (float) str_replace(',', '.', $value); + $sqlFilter .= pSQL($key).' = '.pSQL(trim($value)).' '; + } else { + $sqlFilter .= pSQL($key).' LIKE \'%'.pSQL(trim($value)).'%\' '; + } + } + + if ($table == 'customer') { + $this->_filterCustomer .= $sqlFilter; + } elseif ($table == 'newsletter') { + $this->_filterNewsletter .= $sqlFilter; + } + } + } + } + } +} diff --git a/modules/qloblockcontact/views/templates/hook/index.php b/modules/blocknewsletter/controllers/admin/index.php similarity index 85% rename from modules/qloblockcontact/views/templates/hook/index.php rename to modules/blocknewsletter/controllers/admin/index.php index 499810d54..81057586e 100644 --- a/modules/qloblockcontact/views/templates/hook/index.php +++ b/modules/blocknewsletter/controllers/admin/index.php @@ -1,29 +1,29 @@ -content_only = true; + } + + public function checkAccess() + { + return strcmp(Tools::getValue('token', ''), $this->module->secure_key) === 0; + } + + public function displayAjaxSubscribeNewsletter() + { + $this->module->newsletterRegistration(); + + $this->context->smarty->assign(array( + 'message_type' => ($this->module->valid && !$this->module->error) ? 'success' : 'error', + 'message' => ($this->module->valid && !$this->module->error) ? $this->module->valid : $this->module->error, + )); + + $response = array( + 'status' => true, + 'message_html' => $this->context->smarty->fetch( + $this->module->getTemplatePath('subscription_execution.tpl') + ), + ); + + $this->ajaxDie(json_encode($response)); + } +} diff --git a/modules/blocknewsletter/controllers/front/verification.php b/modules/blocknewsletter/controllers/front/verification.php index a1950245e..29cbb4be1 100644 --- a/modules/blocknewsletter/controllers/front/verification.php +++ b/modules/blocknewsletter/controllers/front/verification.php @@ -29,14 +29,15 @@ */ class BlocknewsletterVerificationModuleFrontController extends ModuleFrontController { - private $message = ''; - /** * @see FrontController::postProcess() */ public function postProcess() { - $this->message = $this->module->confirmEmail(Tools::getValue('token')); + $this->errors = array_merge( + $this->errors, + $this->module->confirmEmail(Tools::getValue('token')) + ); } /** @@ -44,9 +45,23 @@ class BlocknewsletterVerificationModuleFrontController extends ModuleFrontContro */ public function initContent() { + $this->display_column_left = false; + $this->display_column_right = false; + parent::initContent(); - $this->context->smarty->assign('message', $this->message); $this->setTemplate('verification_execution.tpl'); } + + public function setMedia() + { + parent::setMedia(); + + $this->addCSS($this->module->getPathUri().'views/css/front/verification.css'); + $this->addJS($this->module->getPathUri().'views/js/front/verification.js'); + + Media::addJsDef(array( + 'homepage_url' => $this->context->link->getPageLink('index'), + )); + } } diff --git a/modules/qloblockcontact/views/css/hook/index.php b/modules/blocknewsletter/export/index.php similarity index 85% rename from modules/qloblockcontact/views/css/hook/index.php rename to modules/blocknewsletter/export/index.php index 0a4a63f52..089d93577 100644 --- a/modules/qloblockcontact/views/css/hook/index.php +++ b/modules/blocknewsletter/export/index.php @@ -1,29 +1,29 @@ -name)) - exit; - -$token = Tools::getValue('token'); - -require_once(dirname(__FILE__).'/../../header.php'); -echo $module->confirmEmail($token); -require_once(dirname(__FILE__).'/../../footer.php'); diff --git a/modules/blocknewsletter/views/css/front/index.php b/modules/blocknewsletter/views/css/front/index.php new file mode 100644 index 000000000..b721e4a71 --- /dev/null +++ b/modules/blocknewsletter/views/css/front/index.php @@ -0,0 +1,19 @@ + + + + diff --git a/modules/blocknewsletter/views/templates/admin/newsletter/helpers/list/view-customer-link.tpl b/modules/blocknewsletter/views/templates/admin/newsletter/helpers/list/view-customer-link.tpl new file mode 100644 index 000000000..be0718b96 --- /dev/null +++ b/modules/blocknewsletter/views/templates/admin/newsletter/helpers/list/view-customer-link.tpl @@ -0,0 +1,23 @@ +{** +* 2010-2024 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through LICENSE.txt file inside our module +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to CustomizationPolicy.txt file inside our module for more information. +* +* @author Webkul IN +* @copyright 2010-2024 Webkul IN +* @license LICENSE.txt +*} + + + + {l s='View' mod='blocknewsletter'} + diff --git a/modules/blocknewsletter/views/templates/front/subscription_execution.tpl b/modules/blocknewsletter/views/templates/front/subscription_execution.tpl new file mode 100644 index 000000000..9b043738f --- /dev/null +++ b/modules/blocknewsletter/views/templates/front/subscription_execution.tpl @@ -0,0 +1,25 @@ +{** + * 2010-2024 Webkul. + * + * NOTICE OF LICENSE + * + * All right is reserved, + * Please go through LICENSE.txt file inside our module + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade this module to newer + * versions in the future. If you wish to customize this module for your + * needs please refer to CustomizationPolicy.txt file inside our module for more information. + * + * @author Webkul IN + * @copyright 2010-2024 Webkul IN + * @license LICENSE.txt + *} + +{if isset($message_type) && isset($message)} +

    + {$message} + +

    +{/if} diff --git a/modules/blocknewsletter/views/templates/front/verification_execution.tpl b/modules/blocknewsletter/views/templates/front/verification_execution.tpl index b3b3aff95..33edc1983 100644 --- a/modules/blocknewsletter/views/templates/front/verification_execution.tpl +++ b/modules/blocknewsletter/views/templates/front/verification_execution.tpl @@ -22,4 +22,21 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{$message} \ No newline at end of file + +{include file="$tpl_dir./errors.tpl"} + +{if !count($errors)} +

    + {l s='Thank you for subscribing to our newsletter.' mod='blocknewsletter'} +

    + +

    + {l s='You will be redirected to home page in ' mod='blocknewsletter'} + {l s='5' mod='blocknewsletter'} + {l s='seconds.' mod='blocknewsletter'} +

    + + + {l s='Home Page' mod='blocknewsletter'} + +{/if} diff --git a/modules/blocknewsletter/views/templates/hook/blocknewsletter.tpl b/modules/blocknewsletter/views/templates/hook/blocknewsletter.tpl index be560aac7..6954c90c9 100644 --- a/modules/blocknewsletter/views/templates/hook/blocknewsletter.tpl +++ b/modules/blocknewsletter/views/templates/hook/blocknewsletter.tpl @@ -25,15 +25,20 @@
    -
    +
    -
    -
    - + +
    + + + + + + {* Hook added for GDPR *} {if isset($id_module)} {hook h='displayGDPRConsent' id_module=$id_module} @@ -41,24 +46,14 @@ - +
    {hook h="displayBlockNewsletterBottom" from='blocknewsletter'}
    + +{addJsDefL name=no_internet_txt}{l s='No internet. Please try later.' mod='blocknewsletter' js=1}{/addJsDefL} + -{strip} -{if isset($msg) && $msg} -{addJsDef msg_newsl=$msg|@addcslashes:'\''} -{/if} -{if isset($nw_error)} -{addJsDef nw_error=$nw_error} -{/if} -{addJsDefL name=placeholder_blocknewsletter}{l s='Enter your e-mail' mod='blocknewsletter' js=1}{/addJsDefL} -{addJsDefL name=email_js_error}{l s='Please Enter Valid E-mail' mod='blocknewsletter' js=1}{/addJsDefL} -{if isset($msg) && $msg} - {addJsDefL name=alert_blocknewsletter}{l s='Newsletter : %1$s' sprintf=$msg js=1 mod="blocknewsletter"}{/addJsDefL} -{/if} -{/strip} \ No newline at end of file diff --git a/modules/cheque/controllers/front/validation.php b/modules/cheque/controllers/front/validation.php index f280abd3f..5e4053988 100644 --- a/modules/cheque/controllers/front/validation.php +++ b/modules/cheque/controllers/front/validation.php @@ -33,7 +33,7 @@ class ChequeValidationModuleFrontController extends ModuleFrontController { $cart = $this->context->cart; - if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active) + if ($cart->id_customer == 0 || !$this->module->active) Tools::redirect('index.php?controller=order&step=1'); // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process @@ -54,9 +54,8 @@ class ChequeValidationModuleFrontController extends ModuleFrontController /*Check Order restrict condition before Payment by the customer*/ if (Module::isInstalled('hotelreservationsystem') && Module::isEnabled('hotelreservationsystem')) { require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php'; - $order_restrict_error = HotelOrderRestrictDate::validateOrderRestrictDateOnPayment($this); - if ($order_restrict_error) { - die($this->errors); + if (HotelOrderRestrictDate::validateOrderRestrictDateOnPayment($this)) { + Tools::redirect('index.php?controller=order-opc'); } } /*END*/ diff --git a/modules/cheque/translations/ar.php b/modules/cheque/translations/ar.php index da0d09d1d..8436cda8a 100644 --- a/modules/cheque/translations/ar.php +++ b/modules/cheque/translations/ar.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'الدفع عن طريق الشيكات'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'هذه الوحدة تسمح منك أن تقبل الدفع عن طريق شيك.'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'هل أنت متأكد أنك تريد حذف البيانات الخاصة بك؟'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'يجب تكوين حقول "الدفع لأمر" "العنوان" قبل استخدام هذه الوحدة.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'لا توجد عملة محددة لهذه الإضافة.'; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'مطلوب حصل "ادفع لأمر".'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'مطلوب حقل "العنوان".'; -$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'تم تحديث الإعدادات بنجاح'; -$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'ادفع بواسطة شيك'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'تفاصيل الاتصال'; -$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'ادفع لأمر (الاسم)'; -$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'العنوان'; -$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'العنوان الذي يجب أن يرسل شيك له.'; -$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'حفظ'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'المدفوعات عن طريق الشيكات'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'تتيح لك هذه الوحدة قبول الدفعات مقابل الحجوزات عن طريق الشيكات.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'هل أنت متأكد أنك تريد حذف هذه التفاصيل؟'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'يجب تكوين حقلي \"الدفع حسب الطلب\" و\"العنوان\" قبل استخدام هذه الوحدة.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'لم يتم تعيين أي عملة لهذه الوحدة.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'حقل \"الدفع مقابل الطلب\" مطلوب.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'حقل \"العنوان\" مطلوب.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'تم تحديث الإعدادات'; +$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'الدفع عن طريق شيك'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'بيانات المتصل'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'الدفع لأمر (الاسم)'; +$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'عنوان'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'العنوان الذي يجب إرسال الشيك إليه.'; +$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'يحفظ'; $_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'طريقة الدفع هذه غير متوفرة.'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'الرجوع للدفع'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'اتمام الطلب'; -$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'شيكات الدفع'; -$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'ملخص طلب الشراء'; -$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'سلة الشراء فارغة'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'الشيك'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'كنت قد اخترت الدفع بواسطة الشيك.'; -$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'هنا ملخص طلب الشراء:'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'المبلغ الإجمالي لطلبك'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(شامل للضريبة)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'نحن نقبل عدة عملات لاجراء فحوص.'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'اختيار واحد من الإجراءات التالية :'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'نحن نقبل العملات التالية ليتم إرسالها عن طريق الشيكات :'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'وسيتم عرض مختصر الشيكات والمعلومات العنوان على الصفحة التالية.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'يرجى تأكيد طلبك بالضغط على "أؤكد طلبي".'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'أؤكد طلبي'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'التحقق من الدفع'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'ملخص الطلب'; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'سلة التسوق الخاصة بك فارغة.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'لقد اخترت الدفع عن طريق الشيك.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'فيما يلي ملخص قصير لطلبك:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'يصل المبلغ الإجمالي لطلبك إلى:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(شامل الضريبة)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'نحن نقبل عدة عملات لتلقي المدفوعات عن طريق الشيكات.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'اختر واحد من ما يلي:'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'نسمح بإرسال العملات التالية عن طريق الشيكات:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'سيتم عرض معلومات التحقق من المالك والعنوان في الصفحة التالية.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'يرجى تأكيد طلبك بالنقر فوق \"أؤكد طلبي\"'; $_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'طرق الدفع الأخرى'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'هذه الوحدة تسمح منك أن تقبل الدفع عن طريق شيك.'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'إذا كان اختار العميل طريقة الدفع هذه، فإن حالة الطلب تغيير إلى "في انتظار الدفع."'; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'لذلك ، سوف تحتاج إلى تأكيد يدويا ترتيب بأسرع ما تتلقى الاختيار.'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'اكتمال طلبك بنسبة %s .'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'الرجاء ارسال لنا الاختيار مع :'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'تتيح لك هذه الوحدة قبول الدفعات عن طريق الشيكات.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'إذا اختار العميل طريقة الدفع هذه، فستتغير حالة الطلب إلى \"في انتظار الدفع\".'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'ستحتاج إلى تأكيد الطلب يدويًا بمجرد استلام الشيك.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'طلبك على %s اكتمل.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'يجب أن يتضمن الشيك الخاص بك:'; $_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'مبلغ الدفع.'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'يدفع لأمر'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'إرسال بريد إلى'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'لا تنسى إدراج رقم طلبك #%d.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'لا تنسى أن تدرج مرجع طلبك %s.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'تم ارسال بريد إلكتروني إليك مع هذه المعلومات.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'سيتم إرسال طلبك بأسرع ما ان نتسلم دفعتك.'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'لأية أسئلة أو لمزيد من المعلومات ، يرجى الاتصال'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'دعم العملاء'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'لاحظنا مشكلة مع النظام الخاص بك. إذا كنت تعتقد أن هذا خطأ ، يمكنك الاتصال بنا'; -$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'الدفع بواسطة شيك'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(اجراءات الطلب ستكون اطول)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'يرجى تأكيد طلبك بالنقر على \"اؤكد طلبي\"'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'لاحظنا مشكلة مع النظام الخاص بك. إذا كنت تعتقد أن هذا خطأ ، يمكنك الاتصال بنا'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'الدفع بواسطة شيك'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'تدفع لأمر'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'البريد إلى'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'لا تنس إدخال رقم طلبك #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'لا تنس إدخال مرجع طلبك %s.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'لقد لاحظنا وجود مشكلة في طلبك. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'قسم خدمة العملاء.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'الدفع عن طريق شيك.'; +$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'الدفع عن طريق شيك'; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(معالجة الطلب سوف تكون أطول)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'فيما يلي تفاصيل البنك الخاصة بالشيك الخاص بك:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'كمية:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'تدفع لأمر:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'يرجى إرسال الشيك بالبريد إلى:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'فيما يلي تفاصيل البنك الخاصة بالشيك الخاص بك:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'كمية:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'تدفع لأمر:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'يرجى إرسال الشيك بالبريد إلى:'; diff --git a/modules/cheque/translations/bg.php b/modules/cheque/translations/bg.php index 6db86e91e..aef1f9e11 100644 --- a/modules/cheque/translations/bg.php +++ b/modules/cheque/translations/bg.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - $_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Плащания с чек'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Модул за приемане на плащания чрез чекове.'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Сигурни ли сте, че искате да изтриете данните ?'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Полетата "Плащане от името на" и "Адрес" трябва да са конфигурирани преди да ползвате този модул.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Не е зададена валута за този модул.'; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Полето "Плащане от името на" е задължително.'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Полето "Адрес" е задължително.'; -$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Настройките са обновени'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Този модул ви позволява да приемате плащания за резервации с чек.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Сигурни ли сте, че искате да изтриете тези подробности?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Полетата \"Плащане по поръчка на\" и \"Адрес\" трябва да бъдат конфигурирани преди да използвате този модул.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'За този модул не е зададена валута.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Полето „Плащане по поръчка на“ е задължително.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Полето \"Адрес\" е задължително.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Настройките обновени'; $_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Плащане с чек'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Детайли за контакт'; -$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Плащане по нареждане на (име)'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Данни за контакт'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Плащане по поръчка на (име)'; $_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Адрес'; -$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Адресът, на който чекът трябва да бъде изпратен.'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Адрес, на който трябва да бъде изпратен чекът.'; $_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Запазване'; -$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Този начин на плащане не е възможен.'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Назад към сметката'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Сметка'; -$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Плащане чрез чек'; -$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Обобщение на поръчката'; -$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Вашата количка е празна.'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'Чек'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Вие избрахте да платите с чек.'; -$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Кратко обобщение на поръчката:'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Общата сума на поръчката Ви възлиза на:'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(с данък)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Приемаме няколко валути за плащания с чек.'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Моля, изберете една от следните:'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Ние приемаме следните валути за изпращане с чек:'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Собственикът на чека и информацията за адреса му ще бъдат показани на следващата страница.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'Моля, потвърдете вашата поръчката като натиснете на "Потвърждавам поръчката си".'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Потвърждавам поръчката си'; -$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Други начини за плащане'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Модул за приемане на плащания чрез чекове.'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Ако клиентът избере този метод на плащане, статусът на поръчката ще се промени на \'Очаква плащане.\''; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Ще трябва ръчно да потвърдите поръчката щом получите чек.'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Поръчката Ви в %s е завършена.'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Чекът Ви трябва да включва:'; +$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Този метод на плащане не е наличен.'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Плащане с чек'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Резюме на поръчката'; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Вашата пазарска количка е празна.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Избрали сте плащане с чек.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Ето кратко резюме на вашата поръчка:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Общата сума на вашата поръчка е:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(вкл. данък)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Приемаме няколко валути, за да получаваме плащания с чек.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Изберете едно от следните:'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Ние разрешаваме следните валути да бъдат изпращани с чек:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Информацията за проверка на собственика и адреса ще се покаже на следващата страница.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Моля, потвърдете поръчката си, като щракнете върху „Потвърждавам поръчката си“'; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Други начини на плащане'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Този модул ви позволява да приемате плащания с чек.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Ако клиентът избере този метод на плащане, статусът на поръчката ще се промени на „Чака плащане“.'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Ще трябва ръчно да потвърдите поръчката веднага щом получите чек.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Вашата поръчка на %s е завършена.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Вашият чек трябва да включва:'; $_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Сума за плащане.'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Платимо по нареждане на'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Изпращане до'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Не забравяйте да посочите вашият номер на поръчка №%d.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Не забравяйте да посочите референцията на поръчката си %s.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Тази информация беше изпратена на имейла Ви.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Поръчката Ви ще бъде изпратена щом получим плащането Ви.'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'За въпроси или повече информация, моля свържете се с нашето'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'отдел обслужване на клиенти.'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Забелязахме проблем с вашата поръчка. Ако смятате, че е грешка, можете да се свържете се с нашият'; -$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Плащане с чек'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(обработката на поръчката ще бъде по-дълга)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Моля, потвърдете вашата поръчката като натиснете на "Потвърждавам поръчката си"'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Забелязахме че има проблем с вашата поръчка. Ако мислите че това е грешка свържете се с нашият'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Заплаща се по реда на'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Изпратете по пощата до'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Не забравяйте да въведете номера на вашата поръчка #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Не забравяйте да въведете референтен номер на поръчката си %s.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Забелязахме проблем с вашата поръчка. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'отдел \"Обслужване на клиенти.'; $_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Плащане с чек.'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Плащане с чек'; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(обработването на поръчката ще бъде по-дълго)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Ето банковите данни за вашия чек:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Количество:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'Плаща се по реда на:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Моля, изпратете чека си до:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Ето банковите данни за вашия чек:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Количество:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'Плаща се по реда на:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Моля, изпратете чека си до:'; diff --git a/modules/cheque/translations/ca.php b/modules/cheque/translations/ca.php index 951136a67..a2769c539 100644 --- a/modules/cheque/translations/ca.php +++ b/modules/cheque/translations/ca.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - $_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Pagaments amb xec'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Aquest mòdul us permet acceptar sempre pagaments amb xec.'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Esteu segurs que voleu eliminar aquestes dades?'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Els camps "Pagar per ordre de" i "Adreça" s\'han de configurar abans d\'utilitzar aquest mòdul.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'No hi ha moneda definida per aquest mòdul.'; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'El camp "Pagar per ordre de" és necessari.'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'El camp "Adreça" és necessari.'; -$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Configuració modificada'; -$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Pagament amb xec'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Dades de contacte'; -$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Pagar per ordre de (nom)'; -$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adreça'; -$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Adreça a la qual s\'haurà d\'enviar el xec.'; -$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Desar'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Aquest mòdul permet acceptar pagaments de reserves mitjançant xec.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Esteu segur que voleu suprimir aquests detalls?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Abans d\'utilitzar aquest mòdul s\'han de configurar els camps \"Paga a la comanda de\" i \"Adreça\".'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'No s\'ha establert cap moneda per a aquest mòdul.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'El camp \"Paga a l\'ordre de\" és obligatori.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'El camp \"Adreça\" és obligatori.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'S\'ha actualitzat la configuració'; +$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Pagar amb xec'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Detalls de contacte'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Pagar a l\'ordre de (nom)'; +$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'adreça'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Adreça on s\'ha d\'enviar el xec.'; +$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Desa'; $_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Aquesta forma de pagament no està disponible.'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Torneu a Fer la compra'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Realitza la compra'; $_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Pagament amb xec'; $_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Resum de la comanda'; -$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'El vostre carret de la compra és buit.'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'Xec'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Heu decidit pagar amb xec.'; -$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Breu resum de la vostra comanda:'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'L\'import total de la vostra comanda és:'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(amb impostos)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Acceptem xecs de diverses divises.'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Escolliu-ne un dels següents:'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Acceptem les següents divises per a enviar xecs:'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'El propietari del xec i l\'adreça es mostraran a la pàgina següent.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'Si us plau, confirmeu la vostra comanda fent clic a "Confirmo la meva comanda".'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo la meva comanda'; -$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Altres mètodes de pagament'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Aquest mòdul us permet acceptar sempre pagaments amb xec.'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Si el client opta per aquesta forma de pagament, l\'estat de la comanda passarà a ser \'Esperant el pagament.\''; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Per tant, haureu de confirmar manualment la comanda tan aviat com rebeu un xec.'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'La vostra comanda de %s s\'ha completat.'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Si us plau, envieu un xec a:'; -$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Import a pagar.'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'per a pagar a'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Correu electrònic a'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'No us oblideu d\'inserir el vostre número de comanda #%d.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'No us oblideu d\'inserir el vostre número de referència %s.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Un e-mail li us ha estat enviat amb aquesta informació.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'La vostra comanda serà enviada tan aviat com rebem el vostre pagament.'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Per a qualsevol dubte o més informació, poseu-vos en contacte amb el nostre departament d\'atenció al client'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'servei d\'atenció al client'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Hem detectat un problema amb la vostra comanda. Si creieu que és un error, us podeu posar en contacte amb el nostre'; -$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Pagament amb xec'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el processament de la comanda trigarà)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Si us plau, confirmeu la vostra comanda fent clic a "Confirmo la meva comanda"'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hem detectat un problema amb la vostra comanda. Si penseu que això és un error, us podeu posar en contacte amb el nostre'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Pagament amb xec.'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'La seva cistella de la compra és buida.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Heu optat per pagar amb xec.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí teniu un breu resum de la vostra comanda:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'L\'import total de la teva comanda arriba a:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(IVA inclòs)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Acceptem diverses monedes per rebre pagaments amb xec.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Trieu una de les opcions següents:'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Permetem que les monedes següents s\'enviïn mitjançant xec:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Comproveu la informació del propietari i de l\'adreça es mostrarà a la pàgina següent.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Si us plau, confirmeu la vostra comanda fent clic a \"Confirmo la meva comanda\"'; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Altres formes de pagament'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Aquest mòdul permet acceptar pagaments mitjançant xec.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Si el client tria aquest mètode de pagament, l\'estat de la comanda canviarà a \"Esperant el pagament\".'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Haureu de confirmar manualment la comanda tan bon punt rebeu un xec.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'La teva comanda a %s s\'ha completat.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'El vostre xec ha d\'incloure:'; +$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Import del pagament.'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'A pagar a la comanda de'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Correu a'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'No oblideu inserir el vostre número de comanda #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'No oblideu inserir la vostra referència de comanda %s.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hem detectat un problema amb la teva comanda. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'departament d\'atenció al client.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Pagar amb xec.'; +$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Pagar amb xec'; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el processament de la comanda serà més llarg)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Aquí teniu les dades bancàries del vostre xec:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Import:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'A pagar a l\'ordre de:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Si us plau, envia el teu xec a:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Aquí teniu les dades bancàries del vostre xec:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Import:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'A pagar a l\'ordre de:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Si us plau, envia el teu xec a:'; diff --git a/modules/cheque/translations/de.php b/modules/cheque/translations/de.php index 5ee13e7e9..c3dee3b04 100644 --- a/modules/cheque/translations/de.php +++ b/modules/cheque/translations/de.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Scheckzahlungen'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Modul Zahlung per Scheck'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Möchten Sie wirklich die Details löschen?'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = '"Scheckzahlung" und Adressinformationen müssen eingerichtet sein, um dieses Modul richtig zu nutzen.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Keine Währung für dieses Modul festgelegt.'; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = '"Zahlungsempfänger" ist ein Pflichtfeld.'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = '"Adresse" ist ein Pflichtfeld.'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Zahlungen per Scheck'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Mit diesem Modul können Sie Zahlungen für Buchungen per Scheck akzeptieren.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Sind Sie sicher, dass Sie diese Daten löschen möchten?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Vor der Nutzung dieses Moduls müssen die Felder „Zahlung nach Bestellung“ und „Adresse“ konfiguriert werden.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Für dieses Modul wurde keine Währung festgelegt.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Das Feld „Auf Bestellung bezahlen von“ ist erforderlich.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Das Feld „Adresse“ ist erforderlich.'; $_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert'; -$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Zahlung per Scheck'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Kontaktangaben'; -$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Zahlungsempfänger (Name)'; +$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Mit Scheck zahlen'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Kontaktdetails'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Bezahlen Sie im Auftrag von (Name)'; $_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; -$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Anschrift, an die der Scheck geschickt werden soll'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Adresse, an die der Scheck gesendet werden soll.'; $_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern'; -$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Zahlungsart nicht verfügbar'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Zurück zum Bestellvorgang'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Bestellvorgang'; +$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Diese Zahlungsmethode ist nicht verfügbar.'; $_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Scheckzahlung'; $_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Bestellübersicht'; -$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Ihr Warenkorb ist leer'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'Scheck'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Sie haben die Bezahlung per Scheck gewählt.'; -$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Kurze Zusammenfassung Ihrer Bestellung:'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Der Gesamtbetrag Ihrer Bestellung beträgt'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(inkl. MwSt.)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Wir akzeptieren mehrere Währungen bei Scheckzahlungen.'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Bitte wählen Sie eine aus:'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Wir akzeptieren für Scheckzahlung die folgende Währung:'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Scheckinhaber und Adressinformationen werden auf der nächsten Seite angezeigt.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'Bitte bestätigen Sie Ihre Bestellung durch Klicken auf "KAUFEN".'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'KAUFEN'; -$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere Zahlungsarten'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Modul Zahlung per Scheck'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Wählt der Kunde diese Zahlungsart, wechselt der Auftragsstatus zu "Warte auf Zahlung".'; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Daher müssen Sie die Bestellung manuell bestätigen, sobald Sie einen Scheck erhalten.'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Ihre Bestellung auf %s ist abgeschlossen.'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Bitte senden Sie uns einen Scheck über:'; -$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Zahlungsbetrag'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'zahlbar an'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'E-Mail an'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Bitte vergessen Sie nicht, Ihre Bestellnummer %d mit anzugeben.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Bitte vergessen Sie nicht, Ihre Bestellnummer %s mit anzugeben.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Eine E-Mail mit diesen Informationen wurde Ihnen zugesandt.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Sie erhalten Ihre Bestellung, sobald die Zahlung eingegangen ist.'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Bei Fragen oder für weitere Informationen kontaktieren Sie bitte unseren'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'Kunden-Support'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Wir haben bei Ihrer Bestellung ein Problem festgestellt. Wenn Sie denken, dies sei ein Fehler, können Sie an unseren'; -$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Zahlung per Scheck'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(Bearbeitung dauert länger)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Bitte bestätigen Sie Ihre Bestellung durch Klicken auf "KAUFEN"'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Wir haben bei Ihrer Bestellung ein Problem festgestellt. Wenn Sie denken, dies sei ein Fehler, kontaktieren Sie bitte unseren'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Zahlung per Scheck'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Dein Einkaufswagen ist leer.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Sie haben sich für die Zahlung per Scheck entschieden.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier ist eine kurze Zusammenfassung Ihrer Bestellung:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Der Gesamtbetrag Ihrer Bestellung beträgt:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(Steuer inkl.)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Wir akzeptieren mehrere Währungen, um Zahlungen per Scheck zu erhalten.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Wähle eines der Folgenden:'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Wir erlauben den Versand folgender Währungen per Scheck:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Auf der nächsten Seite werden die Eigentümer- und Adressinformationen des Schecks angezeigt.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Bitte bestätigen Sie Ihre Bestellung, indem Sie auf „Ich bestätige meine Bestellung“ klicken.'; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere Zahlungsmethoden'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Mit diesem Modul können Sie Zahlungen per Scheck akzeptieren.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Wählt der Kunde diese Zahlungsart, ändert sich der Bestellstatus auf „Warten auf Zahlung“.'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Sie müssen die Bestellung manuell bestätigen, sobald Sie einen Scheck erhalten.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Ihre Bestellung am %s ist abgeschlossen.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Ihr Scheck muss Folgendes enthalten:'; +$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Zahlungsbetrag.'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Zahlbar im Auftrag von'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Mail an'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Vergessen Sie nicht, Ihre Bestellnummer #%d einzugeben.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Vergessen Sie nicht, Ihre Bestellreferenz %s einzugeben.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Wir haben ein Problem mit Ihrer Bestellung festgestellt. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'Kundendienstabteilung.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Mit Scheck zahlen.'; +$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Mit Scheck zahlen'; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(Bestellabwicklung wird länger dauern)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Hier sind die Bankdaten für Ihren Scheck:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Menge:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'Zahlbar im Auftrag von:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Bitte senden Sie Ihren Scheck an:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Hier sind die Bankdaten für Ihren Scheck:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Menge:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'Zahlbar im Auftrag von:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Bitte senden Sie Ihren Scheck an:'; diff --git a/modules/cheque/translations/es.php b/modules/cheque/translations/es.php index 275fac6c1..20c615eee 100644 --- a/modules/cheque/translations/es.php +++ b/modules/cheque/translations/es.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Cheque'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Este módulo le permite aceptar pagos por cheque'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = '¿Está seguro de que desea eliminar sus datos?'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Los campos "Páguese a la orden de" y "Dirección" deben configurarse antes de utilizar este módulo.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'No se ha configurado ninguna divisa para este módulo.'; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Debe rellenar el campo "Páguese a la orden de".'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Debe rellenar el campo "Dirección".'; -$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Pagos con cheque'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Este módulo le permite aceptar pagos de reservas mediante cheque.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = '¿Está seguro de que desea eliminar estos detalles?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Los campos \"Pagar a la orden de\" y \"Dirección\" deben configurarse antes de utilizar este módulo.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'No se ha establecido ninguna moneda para este módulo.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'El campo \"Pagar a la orden de\" es obligatorio.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'El campo \"Dirección\" es obligatorio.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Ajustes actualizan'; $_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Pagar con cheque'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Detalles del contacto'; -$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Páguese a la orden de (nombre)'; -$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Dirección'; -$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Dirección a la que debe de ser enviado el cheque.'; -$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; -$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Esta forma de pago no está disponible.'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Volver al Pedido'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Procesos de Pedido'; -$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Pago por cheque'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Detalles de contacto'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Pagar a la orden de (nombre)'; +$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'DIRECCIÓN'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Dirección a donde se debe enviar el cheque.'; +$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Ahorrar'; +$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Este método de pago no está disponible.'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'cheque pago'; $_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Resumen del pedido'; -$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Su carrito está vacío.'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'cheque'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Ha elegido el pago por cheque.'; -$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí tiene un resumen de su pedido:'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'El importe total de su pedido asciende a'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(impuestos inc.)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Aceptamos diferentes divisas para los cheques.'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Elija una de las siguientes:'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Aceptamos la siguiente divisa para su pago:'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'La orden y la dirección del cheque aparecerán en la siguiente página.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'Por favor, confirma tu pedido haciendo clic en "Confirmo mi pedido.".'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo mi pedido'; -$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Otros modos de pago'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Este módulo le permite aceptar pagos por cheque'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Si el cliente opta por esta forma de pago, el estado del pedido cambiará a \'Pago en espera. "'; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Por lo tanto, debe validar manualmente el pedido a la recepción del cheque'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Su pedido de %s está completo.'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Por favor, envíenos un cheque :'; -$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Importe del pago.'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'a la orden de'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'enviar a'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'No te olvides de insertar su número de pedido #%d.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'No te olvides de insertar tu número de pedido %s.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Le hemos enviado un email con los datos anteriores.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Le enviaremos su pedido en cuanto recibamos el pago'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Para cualquier duda, por favor contacte con nosotros'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'de atención al cliente'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Hay un problema con su pedido, póngase en contacto con el servicio de atención al cliente.'; -$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Pagar por cheque'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el procesamiento del pedido tomará más tiempo)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Por favor, confirme su pedido pulsando en \\"Confirmo mi pedido\\"'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hay un problema con su pedido, póngase en contacto con el servicio de atención al cliente.'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Pagar por cheque'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Su cesta está vacía.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Ha elegido pagar con cheque.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí hay un breve resumen de su pedido:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'El importe total de tu pedido asciende a:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(impuestos incluidos)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Aceptamos varias monedas para recibir pagos mediante cheque.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Elige uno de los siguientes:'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Permitimos el envío de cheques con las siguientes monedas:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'La información del propietario y la dirección del cheque se mostrará en la página siguiente.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Por favor confirme su pedido haciendo clic en \'Confirmo mi pedido\''; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'otros métodos de pago'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Este módulo le permite aceptar pagos mediante cheque.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Si el cliente elige este método de pago, el estado del pedido cambiará a \'En espera de pago\'.'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Deberá confirmar manualmente el pedido tan pronto como reciba un cheque.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Su pedido el %s está completo.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Su cheque debe incluir:'; +$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Monto del pago.'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Pagadero a la orden de'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Enviar por correo a'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'No olvides insertar tu número de pedido #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'No olvides introducir la referencia de tu pedido %s.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hemos notado un problema con su pedido. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'Departamento de servicio al cliente.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Pagar con cheque.'; +$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Pagar con cheque'; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(el procesamiento del pedido será más largo)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Aquí están los datos bancarios de su cheque:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Cantidad:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'Pagadero a la orden de:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Por favor envíe su cheque a:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Aquí están los datos bancarios de su cheque:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Cantidad:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'Pagadero a la orden de:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Por favor envíe su cheque a:'; diff --git a/modules/cheque/translations/fr.php b/modules/cheque/translations/fr.php index bf49f8136..0a6fef818 100644 --- a/modules/cheque/translations/fr.php +++ b/modules/cheque/translations/fr.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Chèque'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Ce module vous permet d\'accepter des paiements par chèque.'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Êtes-vous sûr de vouloir supprimer vos paramètres ?'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Les champs "Payer à l\'ordre de" et "Adresse" doivent être configurés avant d\'utiliser ce module.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Aucune devise disponible pour ce module'; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Le champ "Payer à l\'ordre de" est requis.'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Le champ "Adresse" est requis.'; -$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Mise à jour réussie'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Paiements par chèque'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Ce module vous permet d\'accepter les paiements des réservations par chèque.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Êtes-vous sûr de vouloir supprimer ces informations ?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Les champs « Payer à l\'ordre de » et « Adresse » doivent être configurés avant d\'utiliser ce module.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Aucune devise n\'a été définie pour ce module.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Le champ « Payer à l\'ordre de » est obligatoire.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Le champ \"Adresse\" est obligatoire.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; $_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Payer par chèque'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Détails du contact'; $_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Payer à l\'ordre de (nom)'; $_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; $_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Adresse à laquelle le chèque doit être envoyé.'; -$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; -$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Ce moyen de paiement n\'est pas disponible.'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Retour à la commande'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Commander'; +$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Ce mode de paiement n\'est pas disponible.'; $_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Paiement par chèque'; -$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; -$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'chèque'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Vous avez choisi de régler par chèque.'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de la commande'; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Vous avez choisi de payer par chèque.'; $_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Le montant total de votre commande s\'élève à'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Nous acceptons plusieurs devises pour les chèques.'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Merci de choisir parmi les suivantes :'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Nous acceptons la devise suivante pour votre paiement :'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'L\'ordre et l\'adresse du chèque seront affichés sur la page suivante.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'Veuillez confirmer votre commande en cliquant sur « Je confirme ma commande ».'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; -$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Ce module vous permet d\'accepter des paiements par chèque.'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Si le client choisit ce moyen de paiement, la commande passera à l\'état "Paiement en attente".'; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Par conséquent, vous devez valider manuellement la commande dès réception du chèque.'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Veuillez nous envoyer un chèque avec :'; -$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Montant du règlement.'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'payable à l\'ordre de'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'à envoyer à'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Un e-mail contenant ces informations vous a été envoyé.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Votre commande vous sera envoyée dès réception du paiement.'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'support client'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Nous avons rencontré un problème avec votre commande, veuillez contacter notre support client'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Le montant total de votre commande s\'élève à :'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(taxes comprises)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Nous acceptons plusieurs devises pour recevoir les paiements par chèque.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Choisissez l\'une des options suivantes :'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Nous autorisons l\'envoi par chèque des devises suivantes :'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Les informations sur le propriétaire et l’adresse du chèque seront affichées sur la page suivante.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Merci de confirmer votre commande en cliquant sur \'Je confirme ma commande\''; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres modes de paiement'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Ce module vous permet d\'accepter les paiements par chèque.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Si le client choisit ce mode de paiement, le statut de la commande passera à « En attente de paiement ».'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Vous devrez confirmer manuellement la commande dès que vous recevrez un chèque.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s est terminée.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Votre chèque doit comprendre :'; +$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Montant du paiement.'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Payable à l\'ordre de'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Envoyer à'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'N\'oubliez pas d\'insérer votre numéro de commande #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'N\'oubliez pas d\'insérer votre référence de commande %s.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Nous avons remarqué un problème avec votre commande. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'service client.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Payer par chèque.'; $_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Payer par chèque'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(le traitement de la commande sera plus long)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Merci de confirmer votre commande en cliquant sur "Je confirme ma commande"'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Nous avons rencontré un problème avec votre commande. Nous vous invitons à prendre contact avec notre'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Payer par chèque'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(le traitement des commandes sera plus long)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Voici les coordonnées bancaires de votre chèque :'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Montant:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'Payable à l\'ordre de :'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Merci de poster votre chèque à :'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Voici les coordonnées bancaires de votre chèque :'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Montant:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'Payable à l\'ordre de :'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Merci de poster votre chèque à :'; diff --git a/modules/cheque/translations/gl.php b/modules/cheque/translations/gl.php index 3bcd6fe3b..f655b32e1 100644 --- a/modules/cheque/translations/gl.php +++ b/modules/cheque/translations/gl.php @@ -2,30 +2,54 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Estas seguro de querer borrar os teus detalles?'; -$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'enderezo'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Pagos mediante cheque'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Este módulo permítelle aceptar pagos de reservas mediante cheque.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Estás seguro de que queres eliminar estes detalles?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Os campos \"Pagar á orde de\" e \"Enderezo\" deben estar configurados antes de utilizar este módulo.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Non se estableceu ningunha moeda para este módulo.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'O campo \"Pagar á orde de\" é obrigatorio.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'O campo \"Enderezo\" é obrigatorio.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada'; +$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Pagar con cheque'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Datos de contacto'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Pagar á orde de (nome)'; +$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Enderezo'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Enderezo onde se debe enviar o cheque.'; $_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Gardar'; -$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Pago por cheque'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'Cheque'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Elixes pagar por cheque'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Total acumulado do teu pedido '; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(IVA incl)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Aceptamos distinta moeda para pago por cheque'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Elixa entre o seguinte:'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Aceptamos as seguintes moedas para pago por cheque:'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'A informacion do cheque e informacion do enderezo será amosado a seguinte paxina'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo o meu pedido'; -$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Outros metodos de pago'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Por favor envienos un cheque con:'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Un correo electronico foi enviado con esta informacion'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'O seu pedido enviarase tan cedo coma recibamos o pago.'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'soporte ao cliente'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Hemos observado un problema co seu pedido. si usted piensa que ha sido un erro,contacte con nós.'; +$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Este método de pago non está dispoñible.'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Pago con cheque'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Resumo do pedido'; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'A túa cesta da compra está baleira.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Escolleu pagar con cheque.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aquí tes un pequeno resumo do teu pedido:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'O importe total do teu pedido ascende a:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(impostos incluídos)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Aceptamos varias moedas para recibir pagos mediante cheque.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Escolla unha das seguintes opcións:'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Permitimos que se envíen mediante cheque as seguintes moedas:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'A información do propietario e do enderezo da comprobación aparecerá na páxina seguinte.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Confirma o teu pedido facendo clic en \"Confirmo o meu pedido\"'; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Outros métodos de pago'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Este módulo permítelle aceptar pagos mediante cheque.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Se o cliente escolle este método de pago, o estado do pedido cambiará a \"En espera de pago\".'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Terás que confirmar manualmente o pedido en canto recibas un cheque.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'O teu pedido en %s completouse.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'O teu cheque debe incluír:'; +$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Importe do pago.'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Pagar á orde de'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Correo a'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Non esquezas inserir o teu número de pedido #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Non esquezas inserir a referencia do teu pedido %s.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Observamos un problema co teu pedido. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'departamento de atención ao cliente.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Pagar con cheque.'; $_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Pagar con cheque'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Por favor,confirma o teu pedido clickando \\"Confirmo o meu pedido\\"'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Hemos observado un problema co seu pedido. si usted piensa que ha sido un erro,contacte con nós.'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Pagar con cheque'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(o procesamento do pedido será máis longo)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Aquí tes os datos bancarios do teu cheque:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Importe:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'Pagar á orde de:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Por favor envíe o seu cheque a:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Aquí tes os datos bancarios do teu cheque:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Importe:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'Pagar á orde de:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Por favor envíe o seu cheque a:'; diff --git a/modules/cheque/translations/id.php b/modules/cheque/translations/id.php index d19e3ab13..3c2c97cbe 100644 --- a/modules/cheque/translations/id.php +++ b/modules/cheque/translations/id.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Pembayaran menggunakan cek'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Modul ini memungkinkan Anda untuk menerima pembayaran menggunakan cek.'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Apakah Anda yakin ingin menghapus rincian Anda?'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Field "Dibayarkan ke" dan "Alamat" harus diisi agar dapat menggunakan modul ini.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Mata uang belum diset '; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Field "Dibayarkan ke" harus diisi.'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Field "Alamat" harus diisi.'; -$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Seting berhasil diperbaharui'; -$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Bayar Menggunakan Cek'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'detail kontak'; -$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Dibayarkan ke (nama)'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Pembayaran dengan cek'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Modul ini memungkinkan Anda menerima pembayaran pemesanan dengan cek.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Apakah Anda yakin ingin menghapus detail ini?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Bidang \"Bayar sesuai pesanan\" dan \"Alamat\" harus dikonfigurasi sebelum menggunakan modul ini.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Tidak ada mata uang yang ditetapkan untuk modul ini.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Bidang \"Bayar sesuai pesanan\" wajib diisi.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Bidang \"Alamat\" wajib diisi.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Pengaturan diperbarui'; +$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Bayar dengan Cek'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Detail kontak'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Bayar sesuai pesanan (nama)'; $_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Alamat'; -$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Alamat dimana cek harus dikirimkan.'; -$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Simpan'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Alamat tujuan pengiriman cek.'; +$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Menyimpan'; $_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Metode pembayaran ini tidak tersedia.'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Kembali ke halaman Checkout'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Pemeriksaan'; -$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Pembayaran Cek'; -$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Ringkasan pembelian'; -$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Daftar belanja Anda kosong.'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'Cek'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Yang anda pilih, bayar pakai cek'; -$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Uraian singkat pembelanjaan anda'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Total yang harus anda bayar'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(Termasuk pajak)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Kami menerima beberapa mata uang untuk pemeriksaan.'; -$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Pilih salah satu'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Mata uang berikut dapat digunakan:'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Cek pemilik dan alamat informasi akan ditampilkan pada halaman berikutnya.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'Konfirmasikan pembelian Anda dengan memilih tombol \'Konfirmasi pembelian\'.'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Konfirmasi pembelian'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Periksa pembayaran'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Ringkasan pesanan'; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Keranjang belanja anda kosong.'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Anda telah memilih untuk membayar dengan cek.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Berikut ringkasan singkat pesanan Anda:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Jumlah total pesanan Anda mencapai:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(termasuk pajak)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Kami menerima beberapa mata uang untuk menerima pembayaran melalui cek.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Pilih salah satu dari berikut ini:'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Kami mengizinkan mata uang berikut dikirim melalui cek:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Periksa informasi pemilik dan alamat akan ditampilkan di halaman berikutnya.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Silakan konfirmasi pesanan Anda dengan mengklik \'Saya konfirmasi pesanan saya\''; $_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Metode pembayaran lainnya'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Modul ini memungkinkan Anda untuk menerima pembayaran menggunakan cek.'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Jika pelanggan memilih untuk membayar menggunakan metoda pembayaran ini, status order akan berubah menjadi \'Menunggu Pembayaran\''; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Oleh karena itu, Anda akan perlu untuk secara manual mengkonfirmasi pesanan secepat Anda menerima cek.'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Pembelian Anda pada %s telah selesai.'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Segera kirimkan cek'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Modul ini memungkinkan Anda menerima pembayaran dengan cek.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Jika klien memilih metode pembayaran ini, status pesanan akan berubah menjadi \'Menunggu pembayaran\'.'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Anda perlu mengonfirmasi pesanan secara manual segera setelah Anda menerima cek.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Pesanan Anda di %s selesai.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Cek Anda harus mencakup:'; $_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Jumlah pembayaran.'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'dibayarkan kepada urutan'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'mail ke'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Jangan lupa untuk menyertakan nomor pembelian #%d.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'jangan lupa untuk menyertakan nomor referensi pembelian %s.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Sebuah e-mail telah dikirimkan kepada Anda dengan informasi ini.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Pesanan Anda akan dikirim segera setelah kami menerima pembayaran Anda.'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Bila ada pertanyaan atau perlu informasi lainnya, silahkan hubungi'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'Layanan Konsumen'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Ada masalah dalam pembelanjaan anda.Jika ini adalah error, segera hubungi'; -$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Bayar Menggunakan Cek'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(pembelian akan diproses lebih lama)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Konfirmasikan dengan mengklik \'Saya setuju\''; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Kami menemukan masalah dengan order anda. Jika menurut anda, ini error silahkan kontak kami di'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Bayar Menggunakan Cek'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Dibayarkan sesuai pesanan'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Surat ke'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Jangan lupa masukkan nomor pesanan Anda #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Jangan lupa masukkan referensi pesanan Anda %s.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Kami melihat ada masalah dengan pesanan Anda. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'departemen layanan pelanggan.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Bayar dengan cek.'; +$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Bayar dengan cek'; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(pemrosesan pesanan akan lebih lama)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Berikut rincian bank untuk cek Anda:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Jumlah:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'Dibayarkan ke pesanan:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Silakan kirimkan cek Anda ke:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Berikut rincian bank untuk cek Anda:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Jumlah:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'Dibayarkan ke pesanan:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Silakan kirimkan cek Anda ke:'; diff --git a/modules/cheque/translations/nl.php b/modules/cheque/translations/nl.php index d61bd34cd..4fbb9da7e 100644 --- a/modules/cheque/translations/nl.php +++ b/modules/cheque/translations/nl.php @@ -2,59 +2,54 @@ global $_MODULE; $_MODULE = array(); - -$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Cheque'; -$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Deze module staat u toe om betalingen per cheque te accepteren.'; -$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Weet u zeker dat u uw gegevens wilt verwijderen?'; -$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'Vul alle te configureren velden in voor het gebruik van de module.'; -$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Geen valuta gekozen voor deze module'; -$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'De "betalen van de bestelling aan" veld is verplicht.'; -$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Het veld "Adres" is vereist.'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Betalingen per cheque'; +$_MODULE['<{cheque}prestashop>cheque_b290dd450577e98db74b011771bc8d66'] = 'Met deze module kunt u betalingen voor boekingen per cheque accepteren.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Weet u zeker dat u deze gegevens wilt verwijderen?'; +$_MODULE['<{cheque}prestashop>cheque_32776feb26ff6f9648054e796aa0e423'] = 'De velden \"Betalen op volgorde van\" en \"Adres\" moeten worden geconfigureerd voordat u deze module kunt gebruiken.'; +$_MODULE['<{cheque}prestashop>cheque_a02758d758e8bec77a33d7f392eb3f8a'] = 'Er is geen valuta ingesteld voor deze module.'; +$_MODULE['<{cheque}prestashop>cheque_81c6c3ba23ca2657a8eedc561f865ddb'] = 'Het veld \'Betalen op bestelling van\' is verplicht.'; +$_MODULE['<{cheque}prestashop>cheque_00a369029140cfd18857425d49b472f8'] = 'Het veld \"Adres\" is verplicht.'; $_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Instellingen bijgewerkt'; -$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Betaal via acceptgiro'; -$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Contactgegevens'; -$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Betalen van de bestelling van (naam)'; +$_MODULE['<{cheque}prestashop>cheque_a60468657881aa431a0a5fccc76258e2'] = 'Betaal per cheque'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Contact details'; +$_MODULE['<{cheque}prestashop>cheque_4b2f62e281e9a6829c6df0e87d34233a'] = 'Betalen op bestelling van (naam)'; $_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adres'; -$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Adres waar de cheque naar toe moet.'; -$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Opslaan'; +$_MODULE['<{cheque}prestashop>cheque_0fe62049ad5246bc188ec1bae347269e'] = 'Adres waar de cheque naartoe moet worden gestuurd.'; +$_MODULE['<{cheque}prestashop>cheque_c9cc8cce247e49bae79f15173ce97354'] = 'Redden'; $_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Deze betaalmethode is niet beschikbaar.'; -$_MODULE['<{cheque}prestashop>payment_execution_644818852b4dd8cf9da73543e30f045a'] = 'Ga terug naar kassa'; -$_MODULE['<{cheque}prestashop>payment_execution_6ff063fbc860a79759a7369ac32cee22'] = 'Afrekenen'; -$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Betaling via acceptgiro'; -$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Besteloverzicht'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Betaling controleren'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Overzicht van de bestelling'; $_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Uw winkelwagen is leeg.'; -$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'Acceptgiro'; -$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'U heeft gekozen om te betalen met een acceptgiro'; -$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier ziet u een kort overzicht van uw bestelling:'; -$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Het totaalbedrag van uw bestelling is'; -$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(incl. btw)'; -$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'We accepteren meerdere valuta bij het betalen via een acceptgiro'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'U heeft ervoor gekozen om per cheque te betalen.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier is een korte samenvatting van uw bestelling:'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Het totaalbedrag van uw bestelling bedraagt:'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(Incl. btw)'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Wij accepteren verschillende valuta\'s om betalingen per cheque te ontvangen.'; $_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Kies een van de volgende:'; -$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Wij accepteren de volgende valuta om te betalen met een acceptgiro'; -$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'De betalingsgegevens worden op de volgende pagina weergegeven.'; -$_MODULE['<{cheque}prestashop>payment_execution_52f64bc0164b0e79deaeaaaa7e93f98f'] = 'Klik op "Ik bevestig mijn bestelling" aub om uw bestelling te bevestigen.'; -$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Ik bevestig mijn bestelling'; -$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere betaalmethodes'; -$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Deze module staat u toe om betalingen per cheque te accepteren.'; -$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Als de klant deze betaalmethode kiest, dan zal de bestellingstatus veranderen naar \'Wachten op betaling\''; -$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Daarvoor zult u handmatig de bestelling moeten bevestigen zodra u de cheque ontvangt.'; -$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Uw bestelling op %s is compleet.'; -$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Stuur een acceptgiro voorzien van de volgende informatie'; -$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Betaalbedrag.'; -$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'te betalen aan'; -$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Verstuur naar'; -$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Vergeet niet om uw bestellingnummer #%d toe te voegen.'; -$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Vergeet niet om uw bestellingrefentie %s toe te voegen.'; -$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Eenn e-mail is naar u toegestuurd met deze informatie.'; -$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Uw bestelling wordt verzonden zodra we de betaling ontvangen hebben.'; -$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Voor eventuele vragen of voor nadere informatie kunt u contact opnemen met onze'; -$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'klantenservice'; -$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'We hebben gemerkt dat er een probleem is met uw bestelling. Als u denkt dat dit een vergissing is kunt u contact opnemen met onze'; -$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Betaal via acceptgiro'; -$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(orderverwerking duurt langer)'; -$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Klik op: \\"Ik bevestig mijn bestelling\\" om uw bestelling te bevestigen'; -$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'We hebben gemerkt dat er een probleem is met uw bestelling. Als u denkt dat dit een vergissing is kunt u contact opnemen met onze'; -$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Betaal via acceptgiro.'; - - -return $_MODULE; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'We staan ​​toe dat de volgende valuta per cheque worden verzonden:'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'Controleer de eigenaar en adresgegevens worden op de volgende pagina weergegeven.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Bevestig uw bestelling door op \'Ik bevestig mijn bestelling\' te klikken'; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Andere betalingsmethoden'; +$_MODULE['<{cheque}prestashop>infos_14e41f4cfd99b10766cc15676d8cda66'] = 'Met deze module kunt u betalingen per cheque accepteren.'; +$_MODULE['<{cheque}prestashop>infos_e444fe40d43bccfad255cf62ddc8d18f'] = 'Indien de klant voor deze betaalmethode kiest, verandert de bestelstatus naar \'Wachten op betaling\'.'; +$_MODULE['<{cheque}prestashop>infos_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Zodra u een cheque ontvangt, moet u de bestelling handmatig bevestigen.'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Uw bestelling op %s is voltooid.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Uw cheque moet het volgende bevatten:'; +$_MODULE['<{cheque}prestashop>payment_return_621455d95c5de701e05900a98aaa9c66'] = 'Te betalen bedrag.'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'Te betalen bij bestelling van'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'Mail naar'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Vergeet niet uw bestelnummer #%d in te voeren.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Vergeet niet uw bestelreferentie %s in te voeren.'; +$_MODULE['<{cheque}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'We hebben een probleem opgemerkt met uw bestelling. '; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'klantenservice afdeling.'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Betaal per cheque.'; +$_MODULE['<{cheque}prestashop>payment_4b80fae2153218ed763bdadc418e8589'] = 'Betaal per cheque'; +$_MODULE['<{cheque}prestashop>payment_4e1fb9f4b46556d64db55d50629ee301'] = '(orderverwerking zal langer duren)'; +$_MODULE['<{cheque}prestashop>mail_template_html_b6592595266708e46d1d420ab7153213'] = 'Hier zijn de bankgegevens voor uw cheque:'; +$_MODULE['<{cheque}prestashop>mail_template_html_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Hoeveelheid:'; +$_MODULE['<{cheque}prestashop>mail_template_html_1c3bd8f6bd066270354607c08f930baf'] = 'Te betalen bij bestelling van:'; +$_MODULE['<{cheque}prestashop>mail_template_html_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Stuur uw cheque naar:'; +$_MODULE['<{cheque}prestashop>mail_template_text_b6592595266708e46d1d420ab7153213'] = 'Hier zijn de bankgegevens voor uw cheque:'; +$_MODULE['<{cheque}prestashop>mail_template_text_6702a6e3bc2dce95c3e3b61fe578f29c'] = 'Hoeveelheid:'; +$_MODULE['<{cheque}prestashop>mail_template_text_1c3bd8f6bd066270354607c08f930baf'] = 'Te betalen bij bestelling van:'; +$_MODULE['<{cheque}prestashop>mail_template_text_8f1fb2295c4289bae9fc26549b4b45f2'] = 'Stuur uw cheque naar:'; diff --git a/modules/cheque/views/templates/hook/payment_return.tpl b/modules/cheque/views/templates/hook/payment_return.tpl index 21c98bfb7..66eea5216 100644 --- a/modules/cheque/views/templates/hook/payment_return.tpl +++ b/modules/cheque/views/templates/hook/payment_return.tpl @@ -30,10 +30,12 @@
    - {l s='Payable to the order of' mod='cheque'} {if $chequeName}{$chequeName}{else}___________{/if}
    - {l s='Mail to' mod='cheque'} {if $chequeAddress}{$chequeAddress}{else}___________{/if} {if !isset($reference) && isset($id_order) && $id_order} -
    - {l s='Do not forget to insert your order number #%d.' sprintf=$id_order mod='cheque'} +

    - {l s='Do not forget to insert your order number #%d.' sprintf=$id_order mod='cheque'} {else} -
    - {l s='Do not forget to insert your order reference %s.' sprintf=$reference mod='cheque'} +

    - {l s='Do not forget to insert your order reference %s.' sprintf=$reference mod='cheque'} {/if} +
    +
    {else}

    {l s='We noticed a problem with your order. If you think this is an error, feel free to contact our' mod='cheque'} diff --git a/modules/dashactivity/dashactivity.php b/modules/dashactivity/dashactivity.php index a9cc19f49..df63c4b60 100644 --- a/modules/dashactivity/dashactivity.php +++ b/modules/dashactivity/dashactivity.php @@ -140,9 +140,24 @@ class Dashactivity extends Module 'dash_trends_chart1' => array( 'chart_type' => 'pie_chart_trends', 'data' => array( - array('key' => 'qloapps.com', 'y' => round($visits / 2), 'color' => self::$colors[0]), - array('key' => 'google.com', 'y' => round($visits / 3), 'color' => self::$colors[1]), - array('key' => 'Direct Traffic', 'y' => round($visits / 4), 'color' => self::$colors[2]) + array( + 'key' => 'qloapps.com', + 'y' => round($visits / 2), + 'color' => self::$colors[0], + 'percent' => ($visits / 2) ? (Tools::ps_round((100 / 2), 2)) : 0, + ), + array( + 'key' => 'google.com', + 'y' => round($visits / 3), + 'color' => self::$colors[1], + 'percent' => ($visits / 3) ? (Tools::ps_round((100 / 3), 2)) : 0, + ), + array( + 'key' => 'Direct Traffic', + 'y' => round($visits / 4), + 'color' => self::$colors[2], + 'percent' => ($visits / 4) ? (Tools::ps_round((100 / 4), 2)) : 0, + ) ) ) ) @@ -195,29 +210,37 @@ class Dashactivity extends Module Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); $online_visitor = Db::getInstance()->NumRows(); + // Pending bookings will be those bookings which are not paid yet and not in Canceled|Refunded|Payment error state. $pending_orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' - SELECT COUNT(*) + SELECT COUNT(DISTINCT o.`id_order`) FROM `'._DB_PREFIX_.'orders` o - LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (o.current_state = os.id_order_state) LEFT JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd ON (hbd.`id_order` = o.`id_order`) - WHERE os.paid = 1 AND os.shipped = 0 - '.Shop::addSqlRestriction(Shop::SHARE_ORDER). + LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (o.`current_state` = os.`id_order_state`) + WHERE os.`paid` = 0 + AND o.`current_state` NOT IN ('.implode(',', array( + Configuration::get('PS_OS_CANCELED'), + Configuration::get('PS_OS_REFUND'), + Configuration::get('PS_OS_ERROR') + )).')'.Shop::addSqlRestriction(Shop::SHARE_ORDER). (!is_null($params['id_hotel']) ? HotelBranchInformation::addHotelRestriction($params['id_hotel'], 'hbd') : '') ); + // Abandoned cart are which are added to the cart between Min and Max hours conditions $abandoned_cart = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT COUNT(*) FROM `'._DB_PREFIX_.'cart` - WHERE `date_upd` BETWEEN "'.pSQL(date('Y-m-d H:i:s', strtotime('-'.(int)Configuration::get('DASHACTIVITY_CART_ABANDONED_MAX').' MIN'))).'" AND "'.pSQL(date('Y-m-d H:i:s', strtotime('-'.(int)Configuration::get('DASHACTIVITY_CART_ABANDONED_MIN').' MIN'))).'" + WHERE `date_upd` BETWEEN "'.pSQL(date('Y-m-d H:i:s', strtotime('-'.(int)Configuration::get('DASHACTIVITY_CART_ABANDONED_MAX').' HOUR'))).'" AND "'.pSQL(date('Y-m-d H:i:s', strtotime('-'.(int)Configuration::get('DASHACTIVITY_CART_ABANDONED_MIN').' HOUR'))).'" AND id_cart NOT IN (SELECT id_cart FROM `'._DB_PREFIX_.'orders`) '.Shop::addSqlRestriction(Shop::SHARE_ORDER) ); + // pending refunds are the refunds requests which are not denied or refunded yet $return_exchanges = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT COUNT(*) FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_return` or2 ON o.id_order = or2.id_order - WHERE or2.`date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'" + LEFT JOIN `'._DB_PREFIX_.'order_return_state` ors ON (or2.state = ors.id_order_return_state) + WHERE (ors.`denied` = 0 AND ors.`refunded` = 0) '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o') ); @@ -253,6 +276,7 @@ class Dashactivity extends Module AND newsletter = 1 '.Shop::addSqlRestriction(Shop::SHARE_ORDER) ); + $total_suscribers = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT COUNT(*) FROM `'._DB_PREFIX_.'customer` @@ -308,8 +332,15 @@ class Dashactivity extends Module $referers = $this->getReferer($date_from, $date_to); $return = array('chart_type' => 'pie_chart_trends', 'data' => array()); $i = 0; + + $totalTraffic = array_sum(array_values($referers)); foreach ($referers as $referer_name => $n) { - $return['data'][] = array('key' => $referer_name, 'y' => $n, 'color' => self::$colors[$i++]); + $return['data'][] = array( + 'key' => $referer_name, + 'y' => $n, + 'color' => self::$colors[$i++], + 'percent' => $n ? (Tools::ps_round($n / $totalTraffic * 100, 2)) : 0, + ); } return $return; @@ -437,7 +468,7 @@ class Dashactivity extends Module ); $fields_form['form']['input'][] = array( 'label' => $this->l('Abandoned cart (max)'), - 'hint' => $this->l('How long (in hours) after the last action a cart is no longer to be considered as abandoned (default: 24 hrs).'), + 'hint' => $this->l('How long (in hours) after the last action a cart is no longer to be considered as abandoned (default: 48 hrs).'), 'name' => 'DASHACTIVITY_CART_ABANDONED_MAX', 'type' => 'text', 'suffix' => $this->l('hrs'), @@ -462,6 +493,38 @@ class Dashactivity extends Module return $helper->generateForm(array($fields_form)); } + // Validation of the configuration form + public function validateDashConfig($configs) + { + $errors = []; + + if (!Validate::isUnsignedInt($configs['DASHACTIVITY_CART_ACTIVE']) + || !$configs['DASHACTIVITY_CART_ACTIVE'] + ) { + $errors[] = $this->l('Active cart must be a positive integer.'); + } + + if (!Validate::isUnsignedInt($configs['DASHACTIVITY_VISITOR_ONLINE']) + || !$configs['DASHACTIVITY_VISITOR_ONLINE'] + ) { + $errors[] = $this->l('Online visitor must be a positive integer.'); + } + + if (!Validate::isUnsignedFloat($configs['DASHACTIVITY_CART_ABANDONED_MIN']) + || !$configs['DASHACTIVITY_CART_ABANDONED_MIN'] + ) { + $errors[] = $this->l('Minimum abandoned cart must be valid hours.'); + } + + if (!Validate::isUnsignedFloat($configs['DASHACTIVITY_CART_ABANDONED_MAX']) + || !$configs['DASHACTIVITY_CART_ABANDONED_MAX'] + ) { + $errors[] = $this->l('Maximum abandoned cart must be valid hours.'); + } + + return $errors; + } + public function getConfigFieldsValues() { return array( diff --git a/modules/dashactivity/views/css/dashactivity.css b/modules/dashactivity/views/css/dashactivity.css index d3874bd8d..960bd1138 100644 --- a/modules/dashactivity/views/css/dashactivity.css +++ b/modules/dashactivity/views/css/dashactivity.css @@ -31,7 +31,7 @@ /* end */ #dashactivity .activity-section { position: relative; - padding-bottom: 2px; + padding-bottom: 10px; margin-bottom: 15px; border-bottom: 2px solid #D3D8DB; } @@ -39,7 +39,7 @@ #dashactivity .title span { margin-bottom: 4px; font-weight: bold; - font-size: 18px; + font-size: 16px; color: #555555; } @@ -81,7 +81,7 @@ #dashactivity .stats-list .item-label span { margin-bottom: 4px; - font-size: 16px; + font-size: 14px; color: #555555; } @@ -98,7 +98,7 @@ #dashactivity .stats-list .item-value span { font-weight: bold; - font-size: 18px; + font-size: 16px; text-align: right; color: #555555; } diff --git a/modules/dashactivity/views/js/dashactivity.js b/modules/dashactivity/views/js/dashactivity.js index 5bbc22485..a84820e02 100644 --- a/modules/dashactivity/views/js/dashactivity.js +++ b/modules/dashactivity/views/js/dashactivity.js @@ -31,10 +31,18 @@ function pie_chart_trends(widget_name, chart_details) .y(function(d) { return d.y }) .color(d3.scale.category10().range()) .valueFormat(d3.format(".0f")) - .donut(true) - .showLabels(false) - .showLegend(false) - .donutRatio(0.4); + .showLabels(true) + .showLegend(false) + .labelThreshold(.01) + .labelType('percent') + .donut(true) + .donutRatio(0.35); + + // create content for the tooltip of chart + chart.tooltip.contentGenerator((obj, element) => { + var tooltipContent = '

    ' + obj.data.y + ' (' + obj.data.percent + '%)

    '; + return getTooltipContent(obj.data.key, tooltipContent, obj.color); + }); d3.select("#dash_traffic_chart2 svg") .datum(chart_details.data) diff --git a/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl b/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl index 31525df73..95cee2cd3 100644 --- a/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl +++ b/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl @@ -23,189 +23,177 @@ * International Registered Trademark & Property of PrestaShop SA *} -
    -
    -
    - {l s="Activity overview" mod="dashactivity"} - - - - - - - - -
    -
    -
    {l s="Configuration" mod="dashactivity"}
    - {$dashactivity_config_form} -
    +
    +
    + {l s="Activity overview" mod='dashactivity'} + + + + + + + + +
    +
    +
    {l s="Configuration" mod='dashactivity'}
    + {$dashactivity_config_form} +
    -
    - - - {l s="Online Visitors" mod="dashactivity"} - - - - - -
    - - {l s="in the last %d minutes" sprintf=$DASHACTIVITY_VISITOR_ONLINE|intval mod="dashactivity"} - -
    -
    +
    + + + {l s="Online Visitors" mod='dashactivity'} + + + + + +
    + + {l s="in the last %d minutes" sprintf=$DASHACTIVITY_VISITOR_ONLINE|intval mod='dashactivity'} + +
    +
    -
    - - - {l s="Active Booking Carts" mod="dashactivity"} - - - - - -
    - - {l s="in the last %d minutes" sprintf=$DASHACTIVITY_CART_ACTIVE|intval mod="dashactivity"} - -
    -
    +
    + + + {l s="Active Booking Carts" mod='dashactivity'} + + + + + +
    + + {l s="in the last %d minutes" sprintf=$DASHACTIVITY_CART_ACTIVE|intval mod='dashactivity'} + +
    +
    -
    - - {l s="Currently Pending" mod="dashactivity"} - - -
    -
    +
    + + {l s="Currently Pending" mod='dashactivity'} + + +
    -
    -
    - {l s="Activity overview" mod="dashactivity"} - - - - - -
    -
    - - {l s="Customers & Newsletters" mod="dashactivity"} - -
    - -
    +
    + + {l s="Customers & Newsletters" mod='dashactivity'} + +
    + +
    - -
    + +
    -
    - - {l s="Traffic" mod="dashactivity"} - -
    - -
    -
    +
      +
      + +
      + + +
      diff --git a/modules/dashavailability/dashavailability.php b/modules/dashavailability/dashavailability.php index a59d76a8b..65ba37ba0 100644 --- a/modules/dashavailability/dashavailability.php +++ b/modules/dashavailability/dashavailability.php @@ -52,6 +52,9 @@ class DashAvailability extends Module public function hookActionAdminControllerSetMedia() { if (get_class($this->context->controller) == 'AdminDashboardController') { + Media::addJsDef(array( + 'avail_rooms_txt' => $this->l('Available Rooms'), + )); $this->context->controller->addJs($this->_path.'views/js/'.$this->name.'.js'); $this->context->controller->addCSS($this->_path.'views/css/'.$this->name.'.css'); } @@ -99,7 +102,7 @@ class DashAvailability extends Module $availability_data, array( 'id' => 'availabilities', - 'key' => $this->l('Availabilities'), + 'key' => $this->l('Availability'), 'border_color' => '#11f0fc', 'color' => '#72C3F0', ) diff --git a/modules/dashavailability/views/js/dashavailability.js b/modules/dashavailability/views/js/dashavailability.js index 89b8137de..af1d6c1f4 100644 --- a/modules/dashavailability/views/js/dashavailability.js +++ b/modules/dashavailability/views/js/dashavailability.js @@ -30,17 +30,49 @@ function line_chart_availability(widget_name, chart_details) { .margin({ left: 30, right: 30, - }); + } + ); - chart.xAxis.tickFormat(function(d) { + chart.xAxis + .tickFormat(function(d) { date = new Date(d * 1000); return date.format(chart_details['date_format']); + }) + // through this function we are also fixing the x axis date and values alignment issue + .tickValues(function(values) { + var indexInterval = Math.floor(values[0].values.length / 10); + + var dates = []; + for (var i = 0; i < 10; i++) { + if (values[0].values[(indexInterval+1) * i]) { + dates.push(values[0].values[(indexInterval+1) * i]); + } + } + var dates = dates.map(function(v) { + return v[0] + }); + + return dates; }); chart.yAxis.tickFormat(function(d) { return Number.isInteger(d) ? d : ''; }); + // create content for the tooltip of chart + chart.interactiveLayer.tooltip.contentGenerator((obj, element) => { + if (typeof obj.series[0] !== 'undefined') { + var date = new Date(obj.value * 1000); + date = date.format(chart_details['date_format']); + + tooltipContent = ''; + tooltipContent += '

      ' + date_txt + ': ' + date + '

      '; + tooltipContent += '

      ' + avail_rooms_txt + ': ' + obj.series[0].value + '

      '; + } + + return getTooltipContent(obj.series[0].key, tooltipContent, obj.series[0].color); + }); + chart.legend.updateState(false); dashavailability_data = chart_details.data; diff --git a/modules/dashavailability/views/templates/hook/dashboard_zone_two.tpl b/modules/dashavailability/views/templates/hook/dashboard_zone_two.tpl index 6385a4eaf..758c679c3 100644 --- a/modules/dashavailability/views/templates/hook/dashboard_zone_two.tpl +++ b/modules/dashavailability/views/templates/hook/dashboard_zone_two.tpl @@ -21,9 +21,9 @@
      - {l s="Availability" mod="dashavailability"} + {l s="Availability" mod='dashavailability'} - + @@ -35,7 +35,7 @@ onclick="availDatePicker()"> @@ -45,17 +45,17 @@
      diff --git a/modules/dashgoals/dashgoals.php b/modules/dashgoals/dashgoals.php index 88b4a097b..b936b83e2 100644 --- a/modules/dashgoals/dashgoals.php +++ b/modules/dashgoals/dashgoals.php @@ -37,6 +37,10 @@ class Dashgoals extends Module protected static $more_color = array('#803E84', '#008E7E', '#20B2E7', '#F66E1B'); protected static $less_color = array('#BC77BE', '#00C2BB', '#51D6F2', '#FBB244'); + const DG_VALUE_TYPE_TEXT = 1; + const DG_VALUE_TYPE_PRICE = 2; + const DG_VALUE_TYPE_PERCENT = 3; + public function __construct() { $this->name = 'dashgoals'; @@ -120,6 +124,13 @@ class Dashgoals extends Module public function hookActionAdminControllerSetMedia() { if (get_class($this->context->controller) == 'AdminDashboardController') { + Media::addJsDef(array( + 'goal_set_txt' => $this->l('Goal Set'), + 'goal_diff_txt' => $this->l('Goal Difference'), + 'VALUE_TYPE_PRICE' => self::DG_VALUE_TYPE_PRICE, + 'VALUE_TYPE_PERCENT' => self::DG_VALUE_TYPE_PERCENT, + )); + $this->context->controller->addJS($this->_path.'views/js/'.$this->name.'.js'); $this->context->controller->addCSS($this->_path.'views/css/'.$this->name.'.css'); } @@ -191,20 +202,19 @@ class Dashgoals extends Module { // There are stream types (different charts) and for each types there are 3 available zones (one color for the goal, one if you over perform and one if you under perfom) $stream_types = array( - array('type' => 'traffic', 'title' => $this->l('Traffic'), 'unit_text' => $this->l('visits')), - array('type' => 'conversion', 'title' => $this->l('Conversion'), 'unit_text' => ''), - array('type' => 'avg_cart_value', 'title' => $this->l('Average order value'), 'unit_text' => ''), - array('type' => 'sales', 'title' => $this->l('Sales'), 'unit_text' => '') + array('type' => 'traffic', 'title' => $this->l('Traffic')), + array('type' => 'conversion', 'title' => $this->l('Conversion rate')), + array('type' => 'avg_cart_value', 'title' => $this->l('Average order value')), + array('type' => 'sales', 'title' => $this->l('Sales')), ); $stream_zones = array( - array('zone' => 'real', 'text' => ''), - array('zone' => 'more', 'text' => $this->l('Goal exceeded')), - array('zone' => 'less', 'text' => $this->l('Goal not reached')) + array('zone' => 'real'), + array('zone' => 'more'), + array('zone' => 'less') ); // We initialize all the streams types for all the zones $streams = array(); - $average_goals = array(); foreach ($stream_types as $key => $stream_type) { $streams[$stream_type['type']] = array(); @@ -212,17 +222,11 @@ class Dashgoals extends Module $streams[$stream_type['type']][$stream_zone['zone']] = array( 'key' => $stream_type['type'].'_'.$stream_zone['zone'], 'title' => $stream_type['title'], - 'unit_text' => $stream_type['unit_text'], - 'zone_text' => $stream_zone['text'], 'color' => ($stream_zone['zone'] == 'more' ? self::$more_color[$key] : ($stream_zone['zone'] == 'less' ? self::$less_color[$key] : self::$real_color[$key])), 'values' => array(), 'disabled' => (isset($stream_type['type']) && $stream_type['type'] == 'sales') ? false : true ); } - - if (isset($stream_type['type'])) { - $average_goals[$stream_type['type']] = 0; - } } if (Configuration::get('PS_DASHBOARD_SIMULATION')) { @@ -235,133 +239,131 @@ class Dashgoals extends Module $sales[$date] = round(rand(3000, 9000), 2); } - // We need to calculate the average value of each goals for the year, this will be the base rate for "100%" - for ($i = '01'; $i <= 12; $i = sprintf('%02d', $i + 1)) { - $average_goals['traffic'] += $this->fakeConfigurationKPI_get('DASHGOALS_TRAFFIC_'.$i.'_'.$year); - $average_goals['conversion'] += $this->fakeConfigurationKPI_get('DASHGOALS_CONVERSION_'.$i.'_'.$year); - $average_goals['avg_cart_value'] += $this->fakeConfigurationKPI_get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year); - } - - foreach ($average_goals as &$average_goal) { - $average_goal /= 12; - } - - $average_goals['sales'] = $average_goals['traffic'] * $average_goals['conversion'] / 100 * $average_goals['avg_cart_value']; - // Now we can calculate the value for every months for ($i = '01'; $i <= 12; $i = sprintf('%02d', $i + 1)) { $timestamp = strtotime($year.'-'.$i.'-01'); + // Start setting traffic dummy data $month_goal = $this->fakeConfigurationKPI_get('DASHGOALS_TRAFFIC_'.$i.'_'.$year); $value = (isset($visits[$timestamp]) ? $visits[$timestamp] : 0); - $stream_values = $this->getValuesFromGoals($average_goals['traffic'], $month_goal, $value, Dashgoals::$month_labels[$i]); - $goal_diff = $value - $month_goal; - $stream_values['real']['traffic'] = $value; - $stream_values['real']['goal'] = $month_goal; - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } + $stream_values = $this->getValuesFromGoals($month_goal, $value, Dashgoals::$month_labels[$i]); - $stream_values['less']['traffic'] = $value; - $stream_values['more']['traffic'] = $value; + $goal_diff = $value - $month_goal; - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = $goal_diff; - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = $goal_diff; - } + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_TEXT; + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + // for dummy data future goal will be 0 always + $monthGoalInfo['is_future_goal'] = 0; - if ($value == 0) { - $streams['traffic']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['traffic'][$stream_zone['zone']]['title']; $streams['traffic'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } + // Start setting conversion rate dummy data $month_goal = $this->fakeConfigurationKPI_get('DASHGOALS_CONVERSION_'.$i.'_'.$year); $value = 100 * ((isset($visits[$timestamp]) && $visits[$timestamp] && isset($orders[$timestamp]) && $orders[$timestamp]) ? ($orders[$timestamp] / $visits[$timestamp]) : 0); - $stream_values = $this->getValuesFromGoals($average_goals['conversion'], $month_goal, $value, Dashgoals::$month_labels[$i]); - $goal_diff = $value - $month_goal; - $stream_values['real']['conversion'] = round($value, 2); - $stream_values['real']['goal'] = round($month_goal, 2); - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } + $stream_values = $this->getValuesFromGoals($month_goal, $value, Dashgoals::$month_labels[$i]); - $stream_values['less']['conversion'] = $value; - $stream_values['more']['conversion'] = $value; + $goal_diff = $value - $month_goal; - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_PERCENT; + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + // for dummy data future goal will be 0 always + $monthGoalInfo['is_future_goal'] = 0; - if ($value == 0) { - $streams['conversion']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['conversion'][$stream_zone['zone']]['title']; $streams['conversion'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } + // Start setting avg cart value dummy data $month_goal = $this->fakeConfigurationKPI_get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year); $value = ((isset($orders[$timestamp]) && $orders[$timestamp] && isset($sales[$timestamp]) && $sales[$timestamp]) ? ($sales[$timestamp] / $orders[$timestamp]) : 0); - $stream_values = $this->getValuesFromGoals($average_goals['avg_cart_value'], $month_goal, $value, Dashgoals::$month_labels[$i]); + $stream_values = $this->getValuesFromGoals($month_goal, $value, Dashgoals::$month_labels[$i]); + $goal_diff = $value - $month_goal; - $stream_values['real']['avg_cart_value'] = $value; - $stream_values['real']['goal'] = $month_goal; - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } - $stream_values['less']['avg_cart_value'] = $value; - $stream_values['more']['avg_cart_value'] = $value; + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_PRICE; + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + // for dummy data future goal will be 0 always + $monthGoalInfo['is_future_goal'] = 0; - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = $goal_diff; - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = $goal_diff; - } - - if ($value == 0) { - $streams['avg_cart_value']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['avg_cart_value'][$stream_zone['zone']]['title']; $streams['avg_cart_value'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } + // Start setting sales dummy data $month_goal = $this->fakeConfigurationKPI_get('DASHGOALS_TRAFFIC_'.$i.'_'.$year) * $this->fakeConfigurationKPI_get('DASHGOALS_CONVERSION_'.$i.'_'.$year) / 100 * $this->fakeConfigurationKPI_get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year); $value = (isset($sales[$timestamp]) ? $sales[$timestamp] : 0); - $stream_values = $this->getValuesFromGoals($average_goals['sales'], $month_goal, $value, Dashgoals::$month_labels[$i]); - $goal_diff = $value - $month_goal; - $stream_values['real']['sales'] = $value; - $stream_values['real']['goal'] = $month_goal; + $stream_values = $this->getValuesFromGoals($month_goal, $value, Dashgoals::$month_labels[$i]); - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } + $goal_diff = $value - $month_goal; - $stream_values['less']['sales'] = $value; - $stream_values['more']['sales'] = $value; + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_PRICE; + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + // for dummy data future goal will be 0 always + $monthGoalInfo['is_future_goal'] = 0; - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = $goal_diff; - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = $goal_diff; - } - - if ($value == 0) { - $streams['sales']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['sales'][$stream_zone['zone']]['title']; $streams['sales'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } } @@ -371,138 +373,141 @@ class Dashgoals extends Module $orders = AdminStatsController::getOrders($year.date('-01-01'), $year.date('-12-31'), 'month'); $sales = AdminStatsController::getTotalSales($year.date('-01-01'), $year.date('-12-31'), 'month'); - // We need to calculate the average value of each goals for the year, this will be the base rate for "100%" - for ($i = '01'; $i <= 12; $i = sprintf('%02d', $i + 1)) { - $average_goals['traffic'] += ConfigurationKPI::get('DASHGOALS_TRAFFIC_'.$i.'_'.$year); - $average_goals['conversion'] += ConfigurationKPI::get('DASHGOALS_CONVERSION_'.$i.'_'.$year) / 100; - $average_goals['avg_cart_value'] += ConfigurationKPI::get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year); - } - foreach ($average_goals as &$average_goal) { - $average_goal /= 12; - } - - $average_goals['sales'] = $average_goals['traffic'] * $average_goals['conversion'] * $average_goals['avg_cart_value']; - // Now we can calculate the value for every months for ($i = '01'; $i <= 12; $i = sprintf('%02d', $i + 1)) { $timestamp = strtotime($year.'-'.$i.'-01'); + // send if goal is for future or past + $isFutureGoal = 0; + if (strtotime($year.'-'.$i) > strtotime(date('Y-m'))) { + $isFutureGoal = 1; + } + + // Start setting traffic data $month_goal = ConfigurationKPI::get('DASHGOALS_TRAFFIC_'.$i.'_'.$year); $value = (isset($visits[$timestamp]) ? $visits[$timestamp] : 0); - $stream_values = $this->getValuesFromGoals($average_goals['traffic'], $month_goal, $value, Dashgoals::$month_labels[$i]); + $stream_values = $this->getValuesFromGoals($month_goal, $value, Dashgoals::$month_labels[$i]); + $goal_diff = $value - $month_goal; - $stream_values['real']['traffic'] = $value; - $stream_values['real']['goal'] = $month_goal; - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } - $stream_values['less']['traffic'] = $value; - $stream_values['more']['traffic'] = $value; + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_TEXT; + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + $monthGoalInfo['is_future_goal'] = $isFutureGoal; - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = $goal_diff; - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = $goal_diff; - } - - if ($value == 0) { - $streams['traffic']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['traffic'][$stream_zone['zone']]['title']; $streams['traffic'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } + // Start setting conversion rate data $month_goal = ConfigurationKPI::get('DASHGOALS_CONVERSION_'.$i.'_'.$year); $value = 100 * ((isset($visits[$timestamp]) && $visits[$timestamp] && isset($orders[$timestamp]) && $orders[$timestamp]) ? ($orders[$timestamp] / $visits[$timestamp]) : 0); - $stream_values = $this->getValuesFromGoals($average_goals['conversion'] * 100, $month_goal, $value, Dashgoals::$month_labels[$i]); + $stream_values = $this->getValuesFromGoals($month_goal, $value, Dashgoals::$month_labels[$i]); + $goal_diff = $value - $month_goal; - $stream_values['real']['conversion'] = round($value, 2); - $stream_values['real']['goal'] = round($month_goal, 2); - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } - $stream_values['less']['conversion'] = $value; - $stream_values['more']['conversion'] = $value; + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_PERCENT; + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + $monthGoalInfo['is_future_goal'] = $isFutureGoal; - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } - - if ($value == 0) { - $streams['conversion']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['conversion'][$stream_zone['zone']]['title']; $streams['conversion'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } + // Start setting average cart value data $month_goal = ConfigurationKPI::get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year); $value = ((isset($orders[$timestamp]) && $orders[$timestamp] && isset($sales[$timestamp]) && $sales[$timestamp]) ? ($sales[$timestamp] / $orders[$timestamp]) : 0); - $stream_values = $this->getValuesFromGoals($average_goals['avg_cart_value'], $month_goal, $value, Dashgoals::$month_labels[$i]); + $stream_values = $this->getValuesFromGoals($month_goal, $value, Dashgoals::$month_labels[$i]); + $goal_diff = $value - $month_goal; - $stream_values['real']['avg_cart_value'] = $value; - $stream_values['real']['goal'] = $month_goal; - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } - $stream_values['less']['avg_cart_value'] = $value; - $stream_values['more']['avg_cart_value'] = $value; + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_PRICE; + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + $monthGoalInfo['is_future_goal'] = $isFutureGoal; - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = $goal_diff; - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = $goal_diff; - } - - if ($value == 0) { - $streams['avg_cart_value']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['avg_cart_value'][$stream_zone['zone']]['title']; $streams['avg_cart_value'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } + // Start setting up data for sales $month_goal = ConfigurationKPI::get('DASHGOALS_TRAFFIC_'.$i.'_'.$year) * ConfigurationKPI::get('DASHGOALS_CONVERSION_'.$i.'_'.$year) / 100 * ConfigurationKPI::get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year); + $value = (isset($sales[$timestamp]) && $sales[$timestamp]) ? $sales[$timestamp] : 0; - $stream_values = $this->getValuesFromGoals($average_goals['sales'], $month_goal, isset($sales[$timestamp]) ? $sales[$timestamp] : 0, Dashgoals::$month_labels[$i]); + + $stream_values = $this->getValuesFromGoals($month_goal, isset($sales[$timestamp]) ? $sales[$timestamp] : 0, Dashgoals::$month_labels[$i]); + $goal_diff = $value - $month_goal; - $stream_values['real']['sales'] = $value; - $stream_values['real']['goal'] = $month_goal; - if ($value > 0) { - $stream_values['real']['goal_diff'] = round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2); - } + $monthGoalInfo = array(); + if ($goal_diff < 0) { + $monthGoalInfo['complete'] = 0; + } else { + $monthGoalInfo['complete'] = 1; + } + $goal_diff = abs($goal_diff); + $monthGoalInfo['value'] = Tools::ps_round($value, 2); + $monthGoalInfo['value_type'] = self::DG_VALUE_TYPE_PRICE; + $monthGoalInfo['goal'] = Tools::ps_round($month_goal, 2); + $monthGoalInfo['goal_diff'] = Tools::ps_round($goal_diff, 2); + $monthGoalInfo['goal_diff_percent'] = ($value > 0) ? Tools::ps_round(($goal_diff * 100) / ($month_goal > 0 ? $month_goal : 1), 2) : 100; + $monthGoalInfo['is_future_goal'] = $isFutureGoal; - $stream_values['less']['sales'] = $value; - $stream_values['more']['sales'] = $value; - - if ($value > 0 && $value < $month_goal) { - $stream_values['less']['goal_diff'] = $goal_diff; - } elseif ($value > 0) { - $stream_values['more']['goal_diff'] = $goal_diff; - } - - if ($value == 0) { - $streams['sales']['less']['zone_text'] = $this->l('Goal set:'); - $stream_values['less']['goal'] = $month_goal; - } + $stream_values['real'] = array_merge($stream_values['real'], $monthGoalInfo); + $stream_values['less'] = array_merge($stream_values['less'], $monthGoalInfo); + $stream_values['more'] = array_merge($stream_values['more'], $monthGoalInfo); foreach ($stream_zones as $stream_zone) { + $stream_values[$stream_zone['zone']]['title'] = $streams['sales'][$stream_zone['zone']]['title']; $streams['sales'][$stream_zone['zone']]['values'][] = $stream_values[$stream_zone['zone']]; } } } - // Merge all the streams before sending + // Merge all the streams before sending $all_streams = array(); foreach ($stream_types as $stream_type) { foreach ($stream_zones as $stream_zone) { @@ -513,40 +518,28 @@ class Dashgoals extends Module return array('chart_type' => 'bar_chart_goals', 'data' => $all_streams); } - protected function getValuesFromGoals($average_goal, $month_goal, $value, $label) - { - // Initialize value for each zone - $stream_values = array( - 'real' => array('x' => $label, 'y' => 0), - 'less' => array('x' => $label, 'y' => 0), - 'more' => array('x' => $label, 'y' => 0) - ); + protected function getValuesFromGoals($month_goal, $value, $label) + { + // Initialize value for each zone + $stream_values = [ + 'real' => ['x' => $label, 'y' => 0], + 'less' => ['x' => $label, 'y' => 0], + 'more' => ['x' => $label, 'y' => 0], + ]; - // Calculate the percentage of fullfilment of the goal - $fullfilment = 0; - if ($value && $month_goal) { - $fullfilment = round($value / $month_goal, 2); - } + if ($value > 0) { + $goalDiff = $value - $month_goal; + if (($goalDiff) > 0) { + $stream_values['real']['y'] = (float)Tools::ps_round($month_goal, 2); + $stream_values['more']['y'] = (float)Tools::ps_round($goalDiff, 2); + } elseif (($goalDiff) < 0) { + $stream_values['real']['y'] = (float)Tools::ps_round($value, 2); + $stream_values['less']['y'] = (float)Tools::ps_round(($month_goal - $value), 2); + } + } else { + $stream_values['less']['y'] = (float)Tools::ps_round($month_goal, 2); + } - // Base rate is essential here : it determines the value of the goal compared to the "100%" of the chart legend - $base_rate = 0; - if ($average_goal && $month_goal) { - $base_rate = $month_goal / $average_goal; - } - - // Fullfilment of 1 means that we performed exactly anticipated - if ($fullfilment == 1) { - $stream_values['real'] = array('x' => $label, 'y' => round($base_rate, 2)); - } elseif ($fullfilment < 1) { - // Fullfilment lower than 1 means that we UNDER performed - $stream_values['real'] = array('x' => $label, 'y' => round($fullfilment * $base_rate, 2)); - $stream_values['less'] = array('x' => $label, 'y' => round($base_rate - ($fullfilment * $base_rate), 2)); - } elseif ($fullfilment > 1) { - // Fullfilment greater than 1 means that we OVER performed - $stream_values['real'] = array('x' => $label, 'y' => round($base_rate, 2)); - $stream_values['more'] = array('x' => $label, 'y' => round(($fullfilment * $base_rate) - $base_rate, 2)); - } - - return $stream_values; - } + return $stream_values; + } } diff --git a/modules/dashgoals/views/js/dashgoals.js b/modules/dashgoals/views/js/dashgoals.js index b2f29c357..d07e3a9fd 100644 --- a/modules/dashgoals/views/js/dashgoals.js +++ b/modules/dashgoals/views/js/dashgoals.js @@ -8,73 +8,13 @@ function bar_chart_goals(widget_name, chart_details) var chart = nv.models.multiBarChart() .stacked(true) - .showControls(false) - .tooltipContent(function(key, y, e, graph) { - if (graph.value == 0) - return ''; + .forceY([0, 1]) + .showControls(false); - if (key == 'sales_real') { - var result = '
      ' + graph.series.title + '
      ' + formatCurrency(parseInt(graph.point.sales), currency_format, currency_sign, currency_blank) + '
      (' + formatCurrency(parseInt(graph.point.goal), currency_format, currency_sign, currency_blank) + ')
      '; - if (graph.point.sales > graph.point.goal) - result += '+'; - else - result += ''; - result += graph.point.goal_diff + '%
      '; - return result; - } else if (key == 'sales_less') { - if (graph.point.sales > 0) - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      ' + formatCurrency(parseInt(graph.point.goal_diff), currency_format, currency_sign, currency_blank) + '
      '; - else - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      (' + formatCurrency(parseInt(graph.point.goal), currency_format, currency_sign, currency_blank) + ')
      '; - } else if (key == 'sales_more') - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      +' + formatCurrency(parseInt(graph.point.goal_diff), currency_format, currency_sign, currency_blank) + '
      '; - else if (key == 'avg_cart_value_real') { - var result = '
      ' + graph.series.title + '
      ' + formatCurrency(parseInt(graph.point.avg_cart_value), currency_format, currency_sign, currency_blank) + '
      (' + formatCurrency(parseInt(graph.point.goal), currency_format, currency_sign, currency_blank) + ')
      '; - if (graph.point.avg_cart_value > graph.point.goal) - result += '+'; - else - result += ''; - result += graph.point.goal_diff + '%
      '; - return result; - } else if (key == 'avg_cart_value_less') { - if (graph.point.avg_cart_value > 0) - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      ' + formatCurrency(parseInt(graph.point.goal_diff), currency_format, currency_sign, currency_blank) + '
      '; - else - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      (' + formatCurrency(parseInt(graph.point.goal), currency_format, currency_sign, currency_blank) + ')
      '; - } else if (key == 'avg_cart_value_more') - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      +' + formatCurrency(parseInt(graph.point.goal_diff), currency_format, currency_sign, currency_blank) + '
      '; - else if (key == 'traffic_real') { - var result = '
      ' + graph.series.title + '
      ' + graph.point.traffic + ' ' +graph.series.unit_text+'
      (' + graph.point.goal + ' ' +graph.series.unit_text+')
      '; - if (graph.point.traffic > graph.point.goal) - result += '+'; - else - result += ''; - result += graph.point.goal_diff + '%
      '; - return result; - } else if (key == 'traffic_less') { - if (graph.point.traffic > 0) - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      ' + graph.point.goal_diff + ' ' +graph.series.unit_text+'
      '; - else - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      (' + graph.point.goal + ' ' +graph.series.unit_text+')
      '; - } else if (key == 'traffic_more') - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      +' + graph.point.goal_diff + ' ' +graph.series.unit_text+'
      '; - else if (key == 'conversion_real') { - var result = '
      ' + graph.series.title + '
      ' + graph.point.conversion + '%
      (' + graph.point.goal + '%)

      '; - if (graph.point.conversion > graph.point.goal) - result += '+'; - else - result += ''; - result += graph.point.goal_diff + '%
      '; - return result; - } else if (key == 'conversion_less') { - if (graph.point.conversion > 0) - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      ' + graph.point.goal_diff + '%
      '; - else - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      (' + graph.point.goal + '%)
      '; - } else if (key == 'conversion_more') - return '
      ' + graph.series.title + '
      ' + graph.series.zone_text + '
      +' + graph.point.goal_diff + '%
      '; - - }); + // create content for the tooltip of chart + chart.tooltip.contentGenerator((obj, element) => { + return getDashgoalsTooltipContent(obj, chart_details); + }); dashgoals_chart = chart; @@ -87,6 +27,9 @@ function bar_chart_goals(widget_name, chart_details) nv.utils.windowResize(chart.update); + // select first chart to set/format values + selectDashgoalsChart('sales'); + return chart; }); } @@ -103,19 +46,27 @@ function selectDashgoalsChart(type) }); } - dashgoals_chart.yAxis.tickFormat(d3.format('.1f')); - if (type == 'avg_cart_value' || type == 'sales') { + // for large values in the Y axis values are gets hidden. So increase the margin left + let yAxisValues = dashgoals_chart.yAxis.scale().domain(); + if (yAxisValues[1] !== 'undefined' && yAxisValues[1] > 999999) { + dashgoals_chart.margin().left = 120 + } + + dashgoals_chart.yAxis.tickFormat(d3.format('.2f')); + dashgoals_chart.yAxis.tickFormat(function(d) { return formatCurrency(parseFloat(d), currency_format, currency_sign, currency_blank); }); - } + }else if (type == 'conversion') { + dashgoals_chart.yAxis.tickFormat(d3.format('.2f')); - if (type == 'conversion') { dashgoals_chart.yAxis.tickFormat(function(d) { return d + ' %'; }); - } + }else if (type == 'traffic') { + dashgoals_chart.yAxis.tickFormat(d3.format('d')); + } dashgoals_toggleDashConfig(); } @@ -174,6 +125,52 @@ function dashgoals_changeYear(xward) }); } +// Get tooltip content for the dashgoals chart +function getDashgoalsTooltipContent(graphDataObject) +{ + var tooltipLabel = graphDataObject.data.title + ' (' + graphDataObject.value + ')'; + var tooltipContent = ''; + + var goal = graphDataObject.data.goal; + var goalDiffrence = graphDataObject.data.goal_diff; + var currentValue = graphDataObject.data.value; + + if (graphDataObject.data.value_type == VALUE_TYPE_PRICE) { + goal = formatCurrency(parseFloat(graphDataObject.data.goal), currency_format, currency_sign, currency_blank); + currentValue = formatCurrency(parseFloat(graphDataObject.data.value), currency_format, currency_sign, currency_blank); + goalDiffrence = formatCurrency(parseFloat(graphDataObject.data.goal_diff), currency_format, currency_sign, currency_blank); + } else if (graphDataObject.data.value_type == VALUE_TYPE_PERCENT) { + goal = graphDataObject.data.goal + ' %'; + currentValue = graphDataObject.data.value + ' %'; + } + + tooltipContent += '

      ' + goal_set_txt + ': ' + goal + '

      '; + + // some values must be displayed for passed months + if (graphDataObject.data.is_future_goal == 0) { + tooltipContent += '

      ' + graphDataObject.data.title + ': ' + currentValue + '

      ';; + + tooltipContent += '

      ' + goal_diff_txt + ': '; + if (graphDataObject.data.complete == 1) { + tooltipContent += '+ '; + } else { + tooltipContent += '- '; + } + + tooltipContent += goalDiffrence + '

      '; + + tooltipContent += '

      '; + } else { + tooltipContent += 'text-danger"> '; + } + tooltipContent += ' ' + graphDataObject.data.goal_diff_percent + '%

      '; + } + + return getTooltipContent(tooltipLabel, tooltipContent, graphDataObject.color); +} + $(document).ready(function() { $('.dashgoals_config_input').keyup(function() { dashgoals_calc_sales(); }); dashgoals_calc_sales(); diff --git a/modules/dashgoals/views/templates/hook/dashboard_zone_two.tpl b/modules/dashgoals/views/templates/hook/dashboard_zone_two.tpl index d707a1d71..7217b8458 100644 --- a/modules/dashgoals/views/templates/hook/dashboard_zone_two.tpl +++ b/modules/dashgoals/views/templates/hook/dashboard_zone_two.tpl @@ -43,12 +43,12 @@ - + - + - + @@ -56,35 +56,36 @@ {include file='./config.tpl'}
      -

      {l s='Please use the configuration button right above here to set targets.' mod='dashgoals'}

      +

      {l s='Set your targets by clicking the configuration button at right position of the header in this section.' mod='dashgoals'}

      +

      {l s='Note' mod='dashgoals'}: {l s='Targets will be set and data will be displayed for all the hotels.' mod='dashgoals'}

      +
      + +
      -
      -
      -
      diff --git a/modules/dashguestcycle/dashguestcycle.php b/modules/dashguestcycle/dashguestcycle.php index a767f07a2..06131ae8f 100644 --- a/modules/dashguestcycle/dashguestcycle.php +++ b/modules/dashguestcycle/dashguestcycle.php @@ -93,7 +93,7 @@ class DashGuestCycle extends Module $dataValue['dgc_total_arrivals'] = sprintf('%02d', $arrivalsData['total_arrivals']); $dataValue['dgc_departed'] = sprintf('%02d', $departuresData['departed']); $dataValue['dgc_total_departures'] = sprintf('%02d', $departuresData['total_departures']); - $dataValue['dgc_new_bookings'] = sprintf('%02d', AdminStatsController::getBookingsByDate($dateToday, $params['id_hotel'])); + $dataValue['dgc_new_bookings'] = sprintf('%02d', count(AdminStatsController::getNewBookingsInfoByDate($dateToday, $params['id_hotel']))); $dataValue['dgc_stay_overs'] = sprintf('%02d', AdminStatsController::getStayOversByDate($dateToday, $params['id_hotel'])); $dataValue['dgc_new_messages'] = sprintf('%02d', CustomerMessage::getMessagesByDate($dateToday)); $dataValue['dgc_cancelled_bookings'] = sprintf('%02d', AdminStatsController::getCancelledBookingsByDate($dateToday, $params['id_hotel'])); @@ -365,7 +365,7 @@ class DashGuestCycle extends Module 'class' => 'text-right', ); $tr[] = array( - 'value' => $newBookingInfo['state_name'], + 'value' => ''.$newBookingInfo['state_name'].'', 'class' => 'text-left', ); diff --git a/modules/dashguestcycle/views/css/dashguestcycle.css b/modules/dashguestcycle/views/css/dashguestcycle.css index b31121c47..4d5eadb09 100644 --- a/modules/dashguestcycle/views/css/dashguestcycle.css +++ b/modules/dashguestcycle/views/css/dashguestcycle.css @@ -17,26 +17,6 @@ * @license LICENSE.txt */ -/* scrollbar design - start */ -#dashguestcycle.dashboard-top ::-webkit-scrollbar { - height: 12px; - margin-bottom: 5px; -} - -#dashguestcycle.dashboard-top ::-webkit-scrollbar-track { - background-color: #DDD; - margin: 0 6px; - border-radius: 10px; -} - -#dashguestcycle.dashboard-top ::-webkit-scrollbar-thumb { - background-color: #BBB; - border-radius: 10px; - margin-bottom: 5px; - -} -/* scrollbar design - end */ - #dashguestcycle { padding-bottom: 5px; } @@ -111,3 +91,7 @@ max-height: 300px; overflow-y: auto; } + +#dashguestcycle table tbody>tr>td { + padding: 8px 7px; +} \ No newline at end of file diff --git a/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl b/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl index 480485694..be28fd58c 100644 --- a/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl +++ b/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl @@ -27,7 +27,7 @@
      -

      {l s="Arrivals" mod="dashguestcycle"}

      +

      {l s="Arrivals" mod='dashguestcycle'}

      @@ -42,7 +42,7 @@

      -

      {l s="Departures" mod="dashguestcycle"}

      +

      {l s="Departures" mod='dashguestcycle'}

      @@ -57,7 +57,7 @@

      -

      {l s="New Bookings" mod="dashguestcycle"}

      +

      {l s="New Bookings" mod='dashguestcycle'}

      @@ -72,7 +72,7 @@

      -

      {l s="Stay Overs" mod="dashguestcycle"}

      +

      {l s="Stay Overs" mod='dashguestcycle'}

      @@ -88,7 +88,7 @@

      - {l s="Guest Messages" mod="dashguestcycle"} + {l s="Guest Messages" mod='dashguestcycle'}

      @@ -105,7 +105,7 @@

      - {l s="Cancelled Bookings" mod="dashguestcycle"} + {l s="Cancelled Bookings" mod='dashguestcycle'}

      @@ -122,7 +122,7 @@

      - {l s="Guests (Adults/Children)" mod="dashguestcycle"} + {l s="Guests (Adults/Children)" mod='dashguestcycle'}

      diff --git a/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl b/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl index 18185c442..abc0a402c 100644 --- a/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl +++ b/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl @@ -51,7 +51,7 @@
    • - {l s='Bookings' mod='dashguestcycle'} + {l s='New Bookings' mod='dashguestcycle'} 0
    • @@ -61,6 +61,7 @@ 0 + {hook h='displayDashGuestCycleTab'}
      @@ -94,6 +95,7 @@
      + {hook h='displayDashGuestCycleTabContent'}
      diff --git a/modules/dashinsights/dashinsights.php b/modules/dashinsights/dashinsights.php index 87b952df2..e589eb147 100644 --- a/modules/dashinsights/dashinsights.php +++ b/modules/dashinsights/dashinsights.php @@ -54,6 +54,14 @@ class DashInsights extends Module public function hookActionAdminControllerSetMedia() { if (Tools::getValue('controller') == 'AdminDashboard') { + Media::addJsDef(array( + 'hotel_txt' => $this->l('Hotel'), + 'room_occupied_txt' => $this->l('Nights Booked'), + 'length_of_stay_txt' => $this->l('Length Of Stay'), + 'total_nights_booked_txt' => $this->l('Total Nights Booked'), + 'date_txt' => $this->l('Date'), + )); + $this->context->controller->addCSS($this->_path.'views/css/'.$this->name.'.css'); $this->context->controller->addJS($this->_path.'views/js/'.$this->name.'.js'); } @@ -133,13 +141,13 @@ class DashInsights extends Module 'chart_type' => 'multibar_chart_dotw_dashinsights', 'data' => $daysOfTheWeekData, 'date_format' => $this->context->language->date_format_lite, + 'axis_labels' => array('y' => $this->l('Rooms occupied')), ), 'dashinsights_multibar_chart2' => array( - 'chart_type' => 'multibar_chart_los_dashinsights', + 'chart_type' => 'multibar_chart_los_dashinsights', 'data' => $lengthOfStayData, 'date_format' => $this->context->language->date_format_lite, - 'axis_labels' => array('x' => $this->l('Days')), - 'y_format' => '%', + 'axis_labels' => array('x' => $this->l('Length of stay'), 'y' => $this->l('Rooms occupied')), ), ), ); @@ -224,7 +232,7 @@ class DashInsights extends Module } if (count($idsHotel) > 0) { // display average series only if other hotels are available - $averageRoomNightsData = AdminStatsController::getRoomNightsData($dateFrom, $dateTo, $idsHotel, true, true); + $averageRoomNightsData = AdminStatsController::getRoomNightsData($dateFrom, $dateTo, $idsHotel, true, true, true); $averageSeriesInfo = array( 'data' => $averageRoomNightsData, 'label' => $this->l('Others Average'), @@ -336,7 +344,7 @@ class DashInsights extends Module $averageDaysOfTheWeekData = AdminStatsController::getOccupiedRoomsForDaysOfTheWeek($dateFrom, $dateTo, $idsHotel, true, true); $averageSeriesInfo = array( 'data' => $averageDaysOfTheWeekData, - 'label' => $this->l('Others Average'), + 'label' => $this->l('Other Hotels Average'), ); $seriesWiseDaysOfTheWeek[] = $averageSeriesInfo; @@ -348,21 +356,25 @@ class DashInsights extends Module $daysOfTheWeekFormattedData = array(); $colorIndex = 0; $weekDays = array( - $this->l('SUN'), - $this->l('MON'), - $this->l('TUE'), - $this->l('WED'), - $this->l('THU'), - $this->l('FRI'), - $this->l('SAT'), + array('key' => $this->l('Sun'), 'name' => $this->l('Sunday')), + array('key' => $this->l('Mon'), 'name' => $this->l('Monday')), + array('key' => $this->l('Tue'), 'name' => $this->l('Tuesday')), + array('key' => $this->l('Wed'), 'name' => $this->l('Wednesday')), + array('key' => $this->l('Thu'), 'name' => $this->l('Thrusday')), + array('key' => $this->l('Fri'), 'name' => $this->l('Friday')), + array('key' => $this->l('Sat'), 'name' => $this->l('Saturday')) ); + foreach ($seriesWiseDaysOfTheWeek as $key => &$hotelDaysOfTheWeek) { $hotelData = array(); + $totalBookedRooms = array_sum(array_values($hotelDaysOfTheWeek['data'])); foreach ($hotelDaysOfTheWeek['data'] as $dayOfWeek => $hotelDayOfTheWeek) { $hotelData[] = array( - 'x' => $weekDays[$dayOfWeek - 1], + 'day' => $weekDays[$dayOfWeek - 1]['name'], + 'x' => $weekDays[$dayOfWeek - 1]['key'], 'y' => $hotelDayOfTheWeek, + 'percent' => $hotelDayOfTheWeek ? (Tools::ps_round($hotelDayOfTheWeek / $totalBookedRooms * 100, 2)) : 0, ); } @@ -382,13 +394,13 @@ class DashInsights extends Module // day ranges to get length of stay data $day = array( - 1 => array(1, 1), - 2 => array(2, 2), - 3 => array(3, 3), - 4 => array(4, 4), - 5 => array(5, 5), - 6 => array(6, 6), 7 => array(7, 100), + 6 => array(6, 6), + 5 => array(5, 5), + 4 => array(4, 4), + 3 => array(3, 3), + 2 => array(2, 2), + 1 => array(1, 1), ); if (Configuration::get('PS_DASHBOARD_SIMULATION')) { @@ -399,33 +411,66 @@ class DashInsights extends Module 'label' => $this->l('All Hotels'), ); - for ($i = 1; $i <= 7; $i++) { - $allHotelSeriesInfo['data'][$i] = sprintf('%0.2f', rand(1, 100) / 100); + $roomsOccupied = array( + 7 => rand(1, 100), + 6 => rand(1, 100), + 5 => rand(1, 100), + 4 => rand(1, 100), + 3 => rand(1, 100), + 2 => rand(1, 100), + 1 => rand(1, 100), + ); + $totalOccupiedRooms = array_sum($roomsOccupied); + foreach ($roomsOccupied as $key => $value) { + $allHotelSeriesInfo['data'][$key]['rooms_occupied'] = $value; + $allHotelSeriesInfo['data'][$key]['percent'] = Tools::ps_round(($value / $totalOccupiedRooms * 100), 2); } $seriesWiseLengthOfStay[] = $allHotelSeriesInfo; } else { // if one of the hotels is selected - $hotelLengthOfStay = array(); - $otherHotelsLengthOfStay = array(); + // calculation for currently selected hotel + $roomsOccupied = array( + 7 => rand(1, 100), + 6 => rand(1, 100), + 5 => rand(1, 100), + 4 => rand(1, 100), + 3 => rand(1, 100), + 2 => rand(1, 100), + 1 => rand(1, 100), + ); - // current hotel series info - $objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id); + $totalOccupiedRooms = array_sum($roomsOccupied); $currentHotelLengthOfStayData = array(); - for ($i = 1; $i <= 7; $i++) { - $currentHotelLengthOfStayData[$i] = sprintf('%0.2f', rand(1, 100) / 100); + foreach ($roomsOccupied as $key => $value) { + $currentHotelLengthOfStayData[$key]['rooms_occupied'] = $value; + $currentHotelLengthOfStayData[$key]['percent'] = Tools::ps_round(($value / $totalOccupiedRooms * 100), 2); } + $objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id); $currentHotelSeriesInfo = array( 'data' => $currentHotelLengthOfStayData, 'label' => $objHotelBranchInformation->hotel_name, ); - // average series info + // calculation for other hotels average series info + $roomsOccupied = array( + 7 => rand(1, 100), + 6 => rand(1, 100), + 5 => rand(1, 100), + 4 => rand(1, 100), + 3 => rand(1, 100), + 2 => rand(1, 100), + 1 => rand(1, 100), + ); + + $totalOccupiedRooms = array_sum($roomsOccupied); $averageLengthOfStayData = array(); - for ($i = 1; $i <= 7; $i++) { - $averageLengthOfStayData[$i] = sprintf('%0.2f', rand(1, 100) / 100); + foreach ($roomsOccupied as $key => $value) { + $averageLengthOfStayData[$key]['rooms_occupied'] = $value; + $averageLengthOfStayData[$key]['percent'] = Tools::ps_round(($value / $totalOccupiedRooms * 100), 2); } + $objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id); $averageSeriesInfo = array( 'data' => $averageLengthOfStayData, 'label' => $this->l('Others Average'), @@ -440,17 +485,16 @@ class DashInsights extends Module if ($idHotel == 0) { // if 'All Hotels' is selected $idsHotel = $this->accessibleIdsHotel; $allHotelSeriesInfo = array( - 'data' => AdminStatsController::getLengthOfStayPercentages($day, $dateFrom, $dateTo, $idsHotel), + 'data' => AdminStatsController::getLengthOfStayInfo($day, $dateFrom, $dateTo, $idsHotel), 'label' => $this->l('All Hotels'), ); $seriesWiseLengthOfStay[] = $allHotelSeriesInfo; } else { // if one of the hotels is selected - $hotelLengthOfStay = array(); $otherHotelsLengthOfStay = array(); $objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id); - $currentHotelLengthOfStayData = AdminStatsController::getLengthOfStayPercentages($day, $dateFrom, $dateTo, $idHotel); + $currentHotelLengthOfStayData = AdminStatsController::getLengthOfStayInfo($day, $dateFrom, $dateTo, $idHotel); $currentHotelSeriesInfo = array( 'data' => $currentHotelLengthOfStayData, @@ -466,7 +510,7 @@ class DashInsights extends Module } if (count($idsHotel) > 0) { // display average series only if other hotels are available - $averageLengthOfStayData = AdminStatsController::getLengthOfStayPercentages($day, $dateFrom, $dateTo, $idsHotel, true, true); + $averageLengthOfStayData = AdminStatsController::getLengthOfStayInfo($day, $dateFrom, $dateTo, $idsHotel, true, true); $averageSeriesInfo = array( 'data' => $averageLengthOfStayData, 'label' => $this->l('Others Average'), @@ -492,10 +536,12 @@ class DashInsights extends Module foreach ($seriesWiseLengthOfStay as $idHotel => &$hotelLengthOfStay) { $hotelData = array(); - foreach ($hotelLengthOfStay['data'] as $numDays => $lengthOfStay) { + foreach ($hotelLengthOfStay['data'] as $numDays => $lengthOfStayInfo) { $hotelData[] = array( 'x' => $losInfos[$numDays - 1]['label'], - 'y' => $lengthOfStay, + 'percent' => Tools::ps_round($lengthOfStayInfo['percent'], 2), + 'y' => $lengthOfStayInfo['rooms_occupied'], + 'rooms_occupied' => $lengthOfStayInfo['rooms_occupied'], ); } diff --git a/modules/dashinsights/views/js/dashinsights.js b/modules/dashinsights/views/js/dashinsights.js index f3a8a0be4..c4c065975 100644 --- a/modules/dashinsights/views/js/dashinsights.js +++ b/modules/dashinsights/views/js/dashinsights.js @@ -24,19 +24,64 @@ function line_chart_dashinsights(widget_name, chart_details) { .useInteractiveGuideline(true) .x(function (d) { return (d !== undefined ? d[0] : 0); }) .y(function (d) { return (d !== undefined ? d[1] : 0); }) - .forceY(0) + .forceY([0, 1]) .margin({ left: 40, right: 30, }); + chart.yAxis.scale().domain([0, 1]); + // create content for the tooltip of chart + chart.interactiveLayer.tooltip.contentGenerator((obj, element) => { + var totalNightsBooked = 0; + var tooltipContent = ''; + + var date = new Date(obj.value * 1000); + date = date.format(chart_details['date_format']); + var tooltipLabel = date_txt + ': ' + date; + + var hotelsContent = ''; + $.each( obj.series, function(index, hotelData) { + totalNightsBooked = totalNightsBooked + parseInt(hotelData.value); + + hotelsContent += '

      '; + hotelsContent += '' + ''; + hotelsContent += hotelData.key + ': ' + hotelData.value + ''; + hotelsContent += '

      '; + }); + + tooltipContent += '

      ' + total_nights_booked_txt + ': ' + totalNightsBooked + '

      '; + tooltipContent += hotelsContent; + + return getTooltipContent(tooltipLabel, tooltipContent); + }); + + // format date values chart.xAxis.tickFormat(function (d) { date = new Date(d * 1000); return date.format(chart_details['date_format']); + }) + // through this function we are also fixing the x axis date and values alignment issue + .tickValues(function(values) { + var indexInterval = (values[0].values.length / 4); + var dates = []; + for (var i = 0; i < 4; i++) { + let dateIndex = Math.round(indexInterval) * i; + if (values[0].values[dateIndex]) { + dates.push(values[0].values[dateIndex]); + } + } + var dates = dates.map(function(v) { + return v[0] + }); + + return dates; }); - chart.yAxis.tickFormat(d3.format('.f')); + // Y axis values must be integer only + chart.yAxis.tickFormat(d3.format('d')); + // initialize chart d3.select('#dashinsights_room_nights svg') .datum(chart_details.data) .call(chart); @@ -51,16 +96,31 @@ function multibar_chart_dotw_dashinsights(widget_name, chart_details) { nv.addGraph(function() { var chart = nv.models.multiBarHorizontalChart() .showControls(false) + .forceY([0, 1]) .margin({ left: 40, right: 30, - }); + } + ); + + // create content for the tooltip of chart + chart.tooltip.contentGenerator((obj, element) => { + var tooltipContent = '

      ' + hotel_txt + ': ' + obj.data.key + '

      '; + tooltipContent += '

      ' + room_occupied_txt + ': ' + obj.data.y + ' (' + obj.data.percent + '%)

      '; + + return getTooltipContent(obj.data.day, tooltipContent, obj.color); + }); chart.xAxis.tickFormat(function (d) { return d; }); - chart.yAxis.tickFormat(d3.format('.f')); + chart.yAxis.axisLabel(chart_details.axis_labels.y) + .tickFormat(function (d) { + return d; + }); + // Y axis values must be integer only + chart.yAxis.tickFormat(d3.format('d')); d3.select('#dashinsights_days_of_the_week svg') .datum(chart_details.data) @@ -77,6 +137,7 @@ function multibar_chart_los_dashinsights(widget_name, chart_details) { nv.addGraph(function() { var chart = nv.models.multiBarHorizontalChart() .showControls(false) + .forceY([0, 1]) .margin({ left: 40, right: 30, @@ -86,9 +147,26 @@ function multibar_chart_los_dashinsights(widget_name, chart_details) { .axisLabel(chart_details.axis_labels.x) .tickFormat(function (d) { return d; - }); + } + ); + chart.yAxis + .axisLabel(chart_details.axis_labels.y) + .tickFormat(function (d) { + return d; + } + ); + // Y axis values must be integer only + chart.yAxis.tickFormat(d3.format('d')); - chart.yAxis.tickFormat(d3.format(chart_details['y_format'])); + // create content for the tooltip of chart + chart.tooltip.contentGenerator((obj, element) => { + var tooltipLabel = length_of_stay_txt + ': ' + obj.data.x; + + var tooltipContent = '

      ' + hotel_txt + ': ' + obj.data.key + '

      '; + tooltipContent += '

      ' + room_occupied_txt + ': ' + obj.data.rooms_occupied + ' (' + obj.data.percent + '%)

      '; + + return getTooltipContent(tooltipLabel, tooltipContent, obj.color); + }); chart.dispatch.stateChange = function () { setTimeout(function () { @@ -111,9 +189,9 @@ function multibar_chart_los_dashinsights(widget_name, chart_details) { }); function positionXAxisLabel() { - d3.select('#dashinsights_length_of_stay .nv-x .nv-axislabel').attr( - 'transform', - d3.transform('rotate(-90) translate(-130, 40)').toString() - ); + d3.select('#dashinsights_length_of_stay .nv-x .nv-axislabel') + .attr('transform', d3.transform('rotate(-90) translate(-130, 40)').toString()) + .attr('y', '-70') + .attr('x', '0'); } } diff --git a/modules/dashinsights/views/templates/hook/dashboard-zone-one.tpl b/modules/dashinsights/views/templates/hook/dashboard-zone-one.tpl index 0834fab23..33f79a279 100644 --- a/modules/dashinsights/views/templates/hook/dashboard-zone-one.tpl +++ b/modules/dashinsights/views/templates/hook/dashboard-zone-one.tpl @@ -20,10 +20,10 @@
      - {l s="Insights" mod="dashinsights"} + {l s="Insights" mod='dashinsights'} - + @@ -31,7 +31,7 @@
      -

      {l s='Length of Stay (%)'}

      +

      {l s='Length of Stay (%)' mod='dashinsights'}

      diff --git a/modules/dashinsights/views/templates/hook/dashboard-zone-two.tpl b/modules/dashinsights/views/templates/hook/dashboard-zone-two.tpl index 79b641f11..ae355ba6b 100644 --- a/modules/dashinsights/views/templates/hook/dashboard-zone-two.tpl +++ b/modules/dashinsights/views/templates/hook/dashboard-zone-two.tpl @@ -32,13 +32,13 @@
      -

      {l s='Room Nights'}

      +

      {l s='Room Nights' mod='dashinsights'}

      -

      {l s='Days of the Week'}

      +

      {l s='Days of the Week' mod='dashinsights'}

      diff --git a/modules/dashoccupancy/dashoccupancy.php b/modules/dashoccupancy/dashoccupancy.php index 6c5d5ef1d..cb646595d 100644 --- a/modules/dashoccupancy/dashoccupancy.php +++ b/modules/dashoccupancy/dashoccupancy.php @@ -74,11 +74,7 @@ class DashOccupancy extends Module $tmp = $tmp - $occupancyData['count_available']; $occupancyData['count_unavailable'] = sprintf('%02d', $tmp); } else { - $occupancyData = AdminStatsController::getOccupancyData( - $params['date_from'], - $params['date_to'], - $params['id_hotel'] - ); + $occupancyData = AdminStatsController::getOccupancyData($params['date_from'], $params['date_to'], $params['id_hotel']); } $dataValue = array( @@ -91,22 +87,25 @@ class DashOccupancy extends Module if ($occupancyData['count_total']) { $dataPieChartBig = array( array( - 'label' => $this->l('Occupied'), - 'value' => $occupancyData['count_total'] + 'label' => $this->l('Occupied Rooms'), + 'value' => $occupancyData['count_occupied'], + 'percent' => Tools::ps_round(($occupancyData['count_total'] ? ($occupancyData['count_occupied'] / $occupancyData['count_total']) * 100 - : 0, + : 0), 2), ), array( - 'label' => $this->l('Available'), - 'value' => $occupancyData['count_total'] + 'label' => $this->l('Available Rooms'), + 'value' => $occupancyData['count_available'], + 'percent' => Tools::ps_round(($occupancyData['count_total'] ? ($occupancyData['count_available'] / $occupancyData['count_total']) * 100 - : 0, + : 0), 2), ), array( - 'label' => $this->l('Unavailable'), - 'value' => $occupancyData['count_total'] + 'label' => $this->l('Unavailable Rooms'), + 'value' => $occupancyData['count_unavailable'], + 'percent' => Tools::ps_round(($occupancyData['count_total'] ? ($occupancyData['count_unavailable'] / $occupancyData['count_total']) * 100 - : 0, + : 0), 2), ), ); } else { diff --git a/modules/dashoccupancy/views/css/dashoccupancy.css b/modules/dashoccupancy/views/css/dashoccupancy.css index 533bcb29f..43b2faf90 100644 --- a/modules/dashoccupancy/views/css/dashoccupancy.css +++ b/modules/dashoccupancy/views/css/dashoccupancy.css @@ -69,6 +69,10 @@ text-align: center; } -.nv-label text { - fill: #fff !important; +#dashoccupancy .label-tooltip { + color: #00aff0; + cursor: pointer; } +#dashoccupancy .tooltip { + text-transform: none; +} \ No newline at end of file diff --git a/modules/dashoccupancy/views/js/dashoccupancy.js b/modules/dashoccupancy/views/js/dashoccupancy.js index 9739a5634..89dd68d39 100644 --- a/modules/dashoccupancy/views/js/dashoccupancy.js +++ b/modules/dashoccupancy/views/js/dashoccupancy.js @@ -31,6 +31,12 @@ function pie_chart_occupancy(widget_name, chart_details) { .donutRatio(0.35) .color(['#A569DF', '#56CE56', '#FF655C']); + // create content for the tooltip of chart + chart.tooltip.contentGenerator((obj, element) => { + var tooltipContent = '

      ' + obj.data.value + ' (' + obj.data.percent + '%)

      '; + return getTooltipContent(obj.data.label, tooltipContent, obj.color); + }); + d3.select('#availablePieChart svg') .datum(chart_details.data) .transition().duration(350) @@ -46,6 +52,10 @@ $(document).ready(function() { start = Date.parseDate($('#date-start').val(), 'Y-m-d'); end = Date.parseDate($('#date-end').val(), 'Y-m-d'); + if (end.getDate() == start.getDate()) { + end.setDate(end.getDate() + 1); + } + $('#dashoccupancy_date_range').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format))); }); @@ -53,6 +63,10 @@ $(document).ready(function() { start = Date.parseDate($('#date-start').val(), 'Y-m-d'); end = Date.parseDate($('#date-end').val(), 'Y-m-d'); + if (end.getDate() == start.getDate()) { + end.setDate(end.getDate() + 1); + } + $('#dashoccupancy_date_range').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format))); }); }); diff --git a/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl b/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl index 55f600369..5b3a6beff 100644 --- a/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl +++ b/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl @@ -20,10 +20,8 @@

      - - {l s='Occupancy' mod='dashoccupancy'} -   - + {l s='Occupancy' mod='dashoccupancy'}  +   diff --git a/modules/dashperformance/dashperformance.php b/modules/dashperformance/dashperformance.php index e5669b80e..81c229856 100644 --- a/modules/dashperformance/dashperformance.php +++ b/modules/dashperformance/dashperformance.php @@ -79,41 +79,48 @@ class DashPerformance extends Module $params['date_to'], $params['id_hotel'] )); - $data['dp_total_revenue_per_available_room'] = Tools::displayPrice(AdminStatsController::getTotalRevenuePerAvailableRoom( + + $data['dp_direct_revenue_ratio'] = sprintf('%0.2f', AdminStatsController::getDirectRevenueRatio( $params['date_from'], $params['date_to'], $params['id_hotel'] - )); + )).'%'; + $data['dp_average_occupancy_rate'] = sprintf('%0.2f', AdminStatsController::getAverageOccupancyRate( $params['date_from'], $params['date_to'], $params['id_hotel'] - ) * 100).'%'; + )).'%'; + + $data['dp_cancellation_rate'] = sprintf('%0.2f', AdminStatsController::getCancellationRate( + $params['date_from'], + $params['date_to'], + $params['id_hotel'] + )).'%'; + $data['dp_revenue_per_available_room'] = Tools::displayPrice(AdminStatsController::getRevenuePerAvailableRoom( $params['date_from'], $params['date_to'], $params['id_hotel'] )); + + $data['dp_total_revenue_per_available_room'] = Tools::displayPrice(AdminStatsController::getTotalRevenuePerAvailableRoom( + $params['date_from'], + $params['date_to'], + $params['id_hotel'] + )); + $data['dp_gross_operating_profit_par'] = Tools::displayPrice(AdminStatsController::getGrossOperatingProfitPerAvailableRoom( $params['date_from'], $params['date_to'], $params['id_hotel'] )); + $data['dp_average_length_of_stay'] = sprintf('%0.2f', AdminStatsController::getAverageLengthOfStay( $params['date_from'], $params['date_to'], $params['id_hotel'] )); - $data['dp_direct_revenue_ratio'] = sprintf('%0.2f', AdminStatsController::getDirectRevenueRatio( - $params['date_from'], - $params['date_to'], - $params['id_hotel'] - ) * 100).'%'; - $data['dp_cancellation_rate'] = sprintf('%0.2f', AdminStatsController::getCancellationRate( - $params['date_from'], - $params['date_to'], - $params['id_hotel'] - ) * 100).'%'; } return array('data_value' => $data); diff --git a/modules/dashperformance/views/templates/hook/dashboard_zone_two.tpl b/modules/dashperformance/views/templates/hook/dashboard_zone_two.tpl index 4ea64cba4..97b3051de 100644 --- a/modules/dashperformance/views/templates/hook/dashboard_zone_two.tpl +++ b/modules/dashperformance/views/templates/hook/dashboard_zone_two.tpl @@ -39,27 +39,7 @@
      -
      -
      -
      -

      {l s='Direct Revenue Ratio' mod='dashperformance'}

      -
      -
      - -- -
      -
      -
      -
      -
      -
      -

      {l s='Total Revenue Per Available Room' mod='dashperformance'}

      -
      -
      - -- -
      -
      -
      -
      +

      {l s='Average Occupancy Rate' mod='dashperformance'}

      @@ -69,37 +49,17 @@
      -
      -
      +
      +
      -

      {l s='Revenue Per Available Room' mod='dashperformance'}

      +

      {l s='Direct Revenue Ratio' mod='dashperformance'}

      - -- + --
      -
      -
      -
      -

      {l s='Gross Operating Profit Per Available Room' mod='dashperformance'}

      -
      -
      - -- -
      -
      -
      -
      -
      -
      -

      {l s='Average Length of Stay' mod='dashperformance'}

      -
      -
      - -- -
      -
      -
      -
      +

      {l s='Cancellation Rate' mod='dashperformance'}

      @@ -109,6 +69,46 @@
      +
      +
      +
      +

      {l s='Revenue Per Available Room' mod='dashperformance'}

      +
      +
      + -- +
      +
      +
      +
      +
      +
      +

      {l s='Total Revenue Per Available Room' mod='dashperformance'}

      +
      +
      + -- +
      +
      +
      +
      +
      +
      +

      {l s='Gross Operating Profit Per Available Room' mod='dashperformance'}

      +
      +
      + -- +
      +
      +
      +
      +
      +
      +

      {l s='Average Length of Stay' mod='dashperformance'}

      +
      +
      + -- +
      +
      +
      diff --git a/modules/dashproducts/dashproducts.php b/modules/dashproducts/dashproducts.php index 9965749a7..c51bf7301 100644 --- a/modules/dashproducts/dashproducts.php +++ b/modules/dashproducts/dashproducts.php @@ -87,6 +87,38 @@ class DashProducts extends Module return $this->display(__FILE__, 'dashboard_zone_two.tpl'); } + // Validation of the configuration form + public function validateDashConfig($configs) + { + $errors = []; + + if (!Validate::isUnsignedInt($configs['DASHPRODUCT_NBR_SHOW_LAST_ORDER']) + || !$configs['DASHPRODUCT_NBR_SHOW_LAST_ORDER'] + ) { + $errors[] = $this->l('Number of recent bookings must be a positive integer.'); + } + + if (!Validate::isUnsignedInt($configs['DASHPRODUCT_NBR_SHOW_BEST_SELLER']) + || !$configs['DASHPRODUCT_NBR_SHOW_BEST_SELLER'] + ) { + $errors[] = $this->l('Number of best selling must be a positive integer.'); + } + + if (!Validate::isUnsignedInt($configs['DASHPRODUCT_NBR_SHOW_MOST_VIEWED']) + || !$configs['DASHPRODUCT_NBR_SHOW_MOST_VIEWED'] + ) { + $errors[] = $this->l('Number of most viewed must be a positive integer.'); + } + + if (!Validate::isUnsignedInt($configs['DASHPRODUCT_NBR_SHOW_TOP_SEARCH']) + || !$configs['DASHPRODUCT_NBR_SHOW_TOP_SEARCH'] + ) { + $errors[] = $this->l('Number of top searches must be a positive integer.'); + } + + return $errors; + } + public function hookDashboardData($params) { $table_recent_orders = $this->getTableRecentOrders($params['id_hotel']); @@ -169,7 +201,7 @@ class DashProducts extends Module ); $tr[] = array( 'id' => 'status', - 'value' => Tools::htmlentitiesUTF8($order['state_name']), + 'value' => ''.Tools::htmlentitiesUTF8($order['state_name']).'', 'class' => 'text-left', ); $tr[] = array( @@ -331,7 +363,7 @@ class DashProducts extends Module ); if (Configuration::get('PS_STATSDATA_PAGESVIEWS')) { - $products = $this->getTotalViewed($date_from, $date_to, (int)Configuration::get('DASHPRODUCT_NBR_SHOW_MOST_VIEWED')); + $products = $this->getTotalViewed($date_from, $date_to, (int)Configuration::get('DASHPRODUCT_NBR_SHOW_MOST_VIEWED'), $id_hotel); $body = array(); if (is_array($products) && count($products)) { foreach ($products as $product) { @@ -406,16 +438,16 @@ class DashProducts extends Module public function getTableTop10MostSearch($date_from, $date_to) { $header = array( + array( + 'id' => 'image', + 'title' => $this->l('Image'), + 'class' => 'text-center' + ), array( 'id' => 'reference', 'title' => $this->l('Hotel'), 'class' => 'text-center' ), - array( - 'id' => 'image', - 'title' => $this->l('Cover image'), - 'class' => 'text-center' - ), array( 'id' => 'location', 'title' => $this->l('Location'), @@ -523,9 +555,8 @@ class DashProducts extends Module { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT count(`id_product`) as count - FROM `'._DB_PREFIX_.'cart_product` cp + FROM `'._DB_PREFIX_.'htl_cart_booking_data` cp WHERE cp.`id_product` = '.(int)$id_product.' - '.Shop::addSqlRestriction(false, 'cp').' AND cp.`date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59"'); } @@ -539,7 +570,7 @@ class DashProducts extends Module ); } - public function getTotalViewed($date_from, $date_to, $limit = 10) + public function getTotalViewed($date_from, $date_to, $limit = 10, $id_hotel = 0) { $objGoogleAnalytics = Module::isEnabled('qlogoogleanalytics') ? Module::getInstanceByName('qlogoogleanalytics') : false; if (Validate::isLoadedObject($objGoogleAnalytics) && $objGoogleAnalytics->isConfigured()) { diff --git a/modules/dashproducts/views/templates/hook/dashboard_zone_two.tpl b/modules/dashproducts/views/templates/hook/dashboard_zone_two.tpl index e8df95585..206fa92da 100644 --- a/modules/dashproducts/views/templates/hook/dashboard_zone_two.tpl +++ b/modules/dashproducts/views/templates/hook/dashboard_zone_two.tpl @@ -22,10 +22,10 @@
      {l s='Sales' mod='dashproducts'} - + - + @@ -41,22 +41,22 @@ @@ -64,7 +64,7 @@
      -

      {l s="Last %d bookings" sprintf=$DASHPRODUCT_NBR_SHOW_LAST_ORDER|intval mod="dashproducts"}

      +

      {l s="Last %d bookings" sprintf=$DASHPRODUCT_NBR_SHOW_LAST_ORDER|intval mod='dashproducts'}

      @@ -74,8 +74,7 @@

      - {l s="Top %d room types" sprintf=$DASHPRODUCT_NBR_SHOW_BEST_SELLER|intval mod="dashproducts"} - {l s="From" mod="dashproducts"} {$date_from} {l s="to" mod="dashproducts"} {$date_to} + {l s="Top %d room types" sprintf=$DASHPRODUCT_NBR_SHOW_BEST_SELLER|intval mod='dashproducts'} ({l s="From" mod='dashproducts'} {$date_from} {l s="to" mod='dashproducts'} {$date_to})

      @@ -86,8 +85,7 @@

      - {l s="Most Viewed" mod="dashproducts"} - {l s="From" mod="dashproducts"} {$date_from} {l s="to" mod="dashproducts"} {$date_to} + {l s="Most viewed room types" mod='dashproducts'} ({l s="From" mod='dashproducts'} {$date_from} {l s="to" mod='dashproducts'} {$date_to})

      @@ -98,9 +96,9 @@
      @@ -112,4 +110,4 @@ -
      \ No newline at end of file +
      diff --git a/modules/dashtrends/dashtrends.php b/modules/dashtrends/dashtrends.php index 7ebec3a3d..7c6f1d06a 100644 --- a/modules/dashtrends/dashtrends.php +++ b/modules/dashtrends/dashtrends.php @@ -65,6 +65,10 @@ class Dashtrends extends Module public function hookActionAdminControllerSetMedia() { if (get_class($this->context->controller) == 'AdminDashboardController') { + Media::addJsDef(array( + 'date_txt' => $this->l('Date'), + )); + $this->context->controller->addJs($this->_path.'views/js/'.$this->name.'.js'); $this->context->controller->addCSS($this->_path.'views/css/'.$this->name.'.css'); } @@ -106,10 +110,10 @@ class Dashtrends extends Module } } else { $tmp_data['visits'] = AdminStatsController::getVisits(false, $date_from, $date_to, 'day'); - $tmp_data['orders'] = AdminStatsController::getOrders($date_from, $date_to, 'day', $params['id_hotel']); - $tmp_data['total_paid_tax_excl'] = AdminStatsController::getTotalSales($date_from, $date_to, 'day', $params['id_hotel']); - $tmp_data['total_purchases'] = AdminStatsController::getPurchases($date_from, $date_to, 'day', $params['id_hotel']); - $tmp_data['total_expenses'] = AdminStatsController::getExpenses($date_from, $date_to, 'day', $params['id_hotel']); + $tmp_data['orders'] = AdminStatsController::getOrders($date_from, $date_to, 'day', $id_hotel); + $tmp_data['total_paid_tax_excl'] = AdminStatsController::getTotalSales($date_from, $date_to, 'day', $id_hotel); + $tmp_data['total_purchases'] = AdminStatsController::getPurchases($date_from, $date_to, 'day', $id_hotel); + $tmp_data['total_expenses'] = AdminStatsController::getExpenses($date_from, $date_to, 'day', $id_hotel); } return $tmp_data; @@ -143,8 +147,7 @@ class Dashtrends extends Module $refined_data['orders'][$date] = isset($gross_data['orders'][$date]) ? $gross_data['orders'][$date] : 0; $refined_data['average_cart_value'][$date] = $refined_data['orders'][$date] ? $refined_data['sales'][$date] / $refined_data['orders'][$date] : 0; $refined_data['visits'][$date] = isset($gross_data['visits'][$date]) ? $gross_data['visits'][$date] : 0; - $refined_data['conversion_rate'][$date] = $refined_data['visits'][$date] ? $refined_data['orders'][$date] / $refined_data['visits'][$date] : 0; - + $refined_data['conversion_rate'][$date] = $refined_data['visits'][$date] ? ($refined_data['orders'][$date] / $refined_data['visits'][$date] * 100) : 0; $refined_data['net_profits'][$date] += (isset($gross_data['total_paid_tax_excl'][$date]) ? $gross_data['total_paid_tax_excl'][$date] : 0); $refined_data['net_profits'][$date] -= (isset($gross_data['total_purchases'][$date]) ? $gross_data['total_purchases'][$date] : 0); $refined_data['net_profits'][$date] -= (isset($gross_data['total_expenses'][$date]) ? $gross_data['total_expenses'][$date] : 0); @@ -311,7 +314,7 @@ class Dashtrends extends Module $charts = array( 'sales' => $this->l('Sales'), - 'orders' => $this->l('Bookings'), + 'orders' => $this->l('Orders'), 'average_cart_value' => $this->l('Average Order Value'), 'visits' => $this->l('Visits'), 'conversion_rate' => $this->l('Conversion Rate'), diff --git a/modules/dashtrends/views/js/dashtrends.js b/modules/dashtrends/views/js/dashtrends.js index 1cdc58385..9631e831e 100644 --- a/modules/dashtrends/views/js/dashtrends.js +++ b/modules/dashtrends/views/js/dashtrends.js @@ -3,59 +3,89 @@ var dashtrends_chart; function line_chart_trends(widget_name, chart_details) { - if (chart_details.data[0].values.length <= 1) { + // when there is no data available do not show the chart + if (chart_details.data[0].values.length <= 1) { $('#dash_trends_chart1').hide(); - $('#no-chart-info').show(); } else { - $('#dash_trends_chart1').show(); - $('#no-chart-info').hide(); - } - nv.addGraph(function() { - var chart = nv.models.lineChart() - .useInteractiveGuideline(true) - .x(function(d) { return (d !== undefined ? d[0] : 0); }) - .y(function(d) { return (d !== undefined ? parseInt(d[1]) : 0); }) - .margin({ - left: 70, - right: 30, - }); + nv.addGraph(function() { + var chart = nv.models.lineChart() + .useInteractiveGuideline(true) + .x(function(d) { return (d !== undefined ? d[0] : 0); }) + .y(function(d) { return (d !== undefined ? parseFloat(d[1]) : 0); }) + .forceY([0, 50]) + .margin({ + left: 70, + right: 30, + }); - chart.xAxis.tickFormat(function(d) { - date = new Date(d*1000); - return date.format(chart_details['date_format']); - }); + chart.xAxis + .tickFormat(function(d) { + date = new Date(d*1000); + return date.format(chart_details['date_format']); + }) + // through this function we are also fixing the x axis date and values alignment issue + .tickValues(function(values) { + var indexInterval = Math.floor(values[0].values.length / 10); - first_data = new Array(); - $.each(chart_details.data, function(index, value) { - if (value.id == 'sales' || value.id == 'sales_compare') - { - if (value.id == 'sales'){ - $('#dashtrends_toolbar dl:first').addClass('active').css("border-color", value.border_color); - } - first_data.push(chart_details.data[index]); - } - }); + var dates = []; + for (var i = 0; i < 10; i++) { + if (values[0].values[(indexInterval+1) * i]) { + dates.push(values[0].values[(indexInterval+1) * i]); + } + } + var dates = dates.map(function(v) { + return v[0] + }); - chart.yAxis.tickFormat(function(d) { - return formatCurrency(parseFloat(d), currency_format, currency_sign, currency_blank); - }); + return dates; + }); - dashtrends_data = chart_details.data; - dashtrends_chart = chart; - d3.select('#dash_trends_chart1 svg') - .datum(first_data) - .call(chart); - nv.utils.windowResize(chart.update); + first_data = new Array(); + $.each(chart_details.data, function(index, value) { + if (value.id == 'sales' || value.id == 'sales_compare') + { + if (value.id == 'sales'){ + $('#dashtrends_toolbar dl:first').addClass('active').css("border-color", value.border_color); + } + first_data.push(chart_details.data[index]); - return chart; - }); + // create content for the tooltip of chart for sales as first chart is Sales + chart.interactiveLayer.tooltip.contentGenerator((obj, element) => { + if (typeof obj.series[0] !== 'undefined') { + var date = new Date(obj.value * 1000); + date = date.format(chart_details['date_format']); + + tooltipContent = ''; + tooltipContent += '

      ' + date_txt + ': ' + date + '

      '; + tooltipContent += '

      ' + obj.series[0].key + ': ' + formatCurrency(parseFloat(obj.series[0].value), currency_format, currency_sign, currency_blank) + '

      '; + } + + return getTooltipContent(obj.series[0].key, tooltipContent, obj.series[0].color); + }); + } + }); + + chart.yAxis.tickFormat(function(d) { + return formatCurrency(parseFloat(d), currency_format, currency_sign, currency_blank); + }); + + dashtrends_data = chart_details; + dashtrends_chart = chart; + d3.select('#dash_trends_chart1 svg') + .datum(first_data) + .call(chart); + nv.utils.windowResize(chart.update); + + return chart; + }); + } } function selectDashtrendsChart(element, type) { // $('#dashtrends_toolbar dl').removeClass('active'); current_charts = new Array(); - $.each(dashtrends_data, function(index, value) { + $.each(dashtrends_data.data, function(index, value) { if (value.id == type || value.id == type + '_compare') { if (value.id == type) @@ -64,22 +94,53 @@ function selectDashtrendsChart(element, type) $(element).css("border-color", value.border_color); } - current_charts.push(dashtrends_data[index]); + current_charts.push(dashtrends_data.data[index]); value.disabled = false; } }); - dashtrends_chart.yAxis.tickFormat(d3.format('.f')); + if (type == 'orders' || type == 'visits') { + dashtrends_chart.yAxis.tickFormat(d3.format('d')); + dashtrends_chart.forceY([0, 1]); + } else { + dashtrends_chart.yAxis.tickFormat(d3.format('.f')); + } - if (type == 'sales' || type == 'average_cart_value' || type == 'net_profits') + if (type == 'sales' || type == 'average_cart_value' || type == 'net_profits') { + dashtrends_chart.forceY([0, 50]); dashtrends_chart.yAxis.tickFormat(function(d) { return formatCurrency(parseFloat(d), currency_format, currency_sign, currency_blank); }); + } - if (type == 'conversion_rate') + if (type == 'conversion_rate') { + dashtrends_chart.forceY([0, 10]); dashtrends_chart.yAxis.tickFormat(function(d) { - return d3.round(d*100, 2)+' %'; + return d3.round(d, 2)+' %'; }); + } + + // create content for the tooltip of chart for different charts dynamically + dashtrends_chart.interactiveLayer.tooltip.contentGenerator((obj, element) => { + if (typeof obj.series[0] !== 'undefined') { + var date = new Date(obj.value * 1000); + date = date.format(dashtrends_data['date_format']); + + if (type == 'sales' || type == 'average_cart_value' || type == 'net_profits') { + var trendValue = formatCurrency(parseFloat(obj.series[0].value), currency_format, currency_sign, currency_blank) + } else if (type == 'conversion_rate') { + var trendValue = d3.round(obj.series[0]['data'][1], 2)+'%'; + } else { + var trendValue = obj.series[0].value; + } + + tooltipContent = ''; + tooltipContent += '

      ' + date_txt + ': ' + date + '

      '; + tooltipContent += '

      ' + obj.series[0].key + ': ' + trendValue + '

      '; + } + + return getTooltipContent(obj.series[0].key, tooltipContent, obj.series[0].color); + }); d3.select('#dash_trends_chart1 svg') .datum(current_charts) diff --git a/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl b/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl index fd5e54ebc..a7483c640 100644 --- a/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl +++ b/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl @@ -53,8 +53,8 @@
      -
      -
      {l s='Bookings' mod='dashtrends'}
      +
      +
      {l s='Orders' mod='dashtrends'}
      @@ -86,11 +86,6 @@ -
      -

      - {l s='The graph is unavailable when selecting this date range. Select another date range for the graph.' mod='dashtrends'} -

      -
      diff --git a/modules/graphnvd3/graphnvd3.php b/modules/graphnvd3/graphnvd3.php index 55dd2c031..7dcc9c4be 100644 --- a/modules/graphnvd3/graphnvd3.php +++ b/modules/graphnvd3/graphnvd3.php @@ -35,6 +35,7 @@ class GraphNvD3 extends ModuleGraphEngine private $_values; private $_legend; private $_titles; + private $_formats; public function __construct($type = null) { @@ -113,6 +114,10 @@ class GraphNvD3 extends ModuleGraphEngine if (jsonData.axisLabels.yAxis != null) chart.yAxis.axisLabel(jsonData.axisLabels.yAxis); + if (jsonData.axisFormat.xAxis) + chart.xAxis.tickFormat(d3.format(jsonData.axisFormat.xAxis)); + if (jsonData.axisFormat.yAxis) + chart.yAxis.tickFormat(d3.format(jsonData.axisFormat.yAxis)); d3.select("#nvd3_chart_'.($divid++).' svg") .datum(jsonData.data) .transition().duration(500) @@ -148,10 +153,16 @@ class GraphNvD3 extends ModuleGraphEngine $this->_titles = $titles; } + public function setFormat($_formats) + { + $this->_formats = $_formats; + } + public function draw() { $array = array( 'axisLabels' => array('xAxis' => $this->_titles['x'], 'yAxis' => $this->_titles['y']), + 'axisFormat' => array('xAxis' => $this->_formats['x'], 'yAxis' => $this->_formats['y']), 'data' => array() ); diff --git a/modules/gridhtml/gridhtml.php b/modules/gridhtml/gridhtml.php index 2a327d110..dbbe49459 100644 --- a/modules/gridhtml/gridhtml.php +++ b/modules/gridhtml/gridhtml.php @@ -58,6 +58,8 @@ class GridHtml extends ModuleGridEngine public static function hookGridEngine($params, $grider) { + static $divid = 1; + $objModule = Module::getInstanceByName('gridhtml'); self::$_columns = $params['columns']; if (!isset($params['emptyMsg'])) @@ -71,32 +73,32 @@ class GridHtml extends ModuleGridEngine } $html = ' - +
      '; foreach ($params['columns'] as $column) - $html .= ''; + $html .= ''; $html .= '
      '.$column['header'].''.$column['header'].'
      '; + $divid++; return $html; } diff --git a/modules/hotelreservationsystem/classes/HotelAdvancedPayment.php b/modules/hotelreservationsystem/classes/HotelAdvancedPayment.php index 5fe1f506d..1cc539d75 100644 --- a/modules/hotelreservationsystem/classes/HotelAdvancedPayment.php +++ b/modules/hotelreservationsystem/classes/HotelAdvancedPayment.php @@ -108,7 +108,13 @@ class HotelAdvancedPayment extends ObjectModel $roomTotalPrices = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( $cartRoomInfo['id_product'], $cartRoomInfo['date_from'], - $cartRoomInfo['date_to'] + $cartRoomInfo['date_to'], + 0, + 0, + $idCart, + $cartRoomInfo['id_guest'], + $cartRoomInfo['id_room'], + 0 ); $roomTypeTotalTI += $roomTotalPrices['total_price_tax_incl']; @@ -319,7 +325,7 @@ class HotelAdvancedPayment extends ObjectModel * @param integer $withTaxes : Amount with(1) or without tax (0) * @return [float] advance payment amount of the room type in the cart */ - public function getRoomMinAdvPaymentAmount($idProduct, $dateFrom, $dateTo, $withTaxes = 1) + public function getRoomMinAdvPaymentAmount($idProduct, $dateFrom, $dateTo, $withTaxes = 1, $idRoom = 0, $idCart = 0, $idGuest = 0) { $dateFrom = date('Y-m-d', strtotime($dateFrom)); $dateTo = date('Y-m-d', strtotime($dateTo)); @@ -328,7 +334,17 @@ class HotelAdvancedPayment extends ObjectModel $advGlobalPercent = Configuration::get('WK_ADVANCED_PAYMENT_GLOBAL_MIN_AMOUNT'); $advGlobalTaxIncl = Configuration::get('WK_ADVANCED_PAYMENT_INC_TAX'); - $roomTotalPrices = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($idProduct, $dateFrom, $dateTo); + $roomTotalPrices = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( + $idProduct, + $dateFrom, + $dateTo, + 0, + 0, + $idCart, + $idGuest, + $idRoom, + 0 + ); $roomTypeTotalTI = $roomTotalPrices['total_price_tax_incl']; $roomTypeTotalTE = $roomTotalPrices['total_price_tax_excl']; diff --git a/modules/hotelreservationsystem/classes/HotelBookingDemands.php b/modules/hotelreservationsystem/classes/HotelBookingDemands.php index b243dfc73..8b98d69f4 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDemands.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDemands.php @@ -175,10 +175,9 @@ class HotelBookingDemands extends ObjectModel return new TaxCalculator($taxes, $computationMethod); } - public function setBookingDemandTaxDetails() + public function setBookingDemandTaxDetails($replace = 0) { - $idBookingDemand = $this->id; - if ($idBookingDemand && Validate::isLoadedObject($objBkDemand = new HotelBookingDemands($idBookingDemand))) { + if ($this->id) { if ($taxCalculator = $this->tax_calculator) { if (!($taxCalculator instanceof TaxCalculator)) { return false; @@ -187,12 +186,11 @@ class HotelBookingDemands extends ObjectModel return true; } $values = ''; - $objGlobalDemand = new HotelRoomTypeGlobalDemand($this->id_global_demand); - $priceTaxExcl = $objBkDemand->unit_price_tax_excl; + $priceTaxExcl = $this->unit_price_tax_excl; foreach ($taxCalculator->getTaxesAmount($priceTaxExcl) as $idTax => $amount) { $quantity = 1; - if ($objGlobalDemand->price_calc_method == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY) { - $objBkDetail = new HotelBookingDetail($objBkDemand->id_htl_booking); + if ($this->price_calc_method == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY) { + $objBkDetail = new HotelBookingDetail($this->id_htl_booking); $quantity = $objBkDetail->getNumberOfDays($objBkDetail->date_from, $objBkDetail->date_to); } switch (Configuration::get('PS_ROUND_TYPE')) { @@ -212,9 +210,15 @@ class HotelBookingDemands extends ObjectModel $totalAmount = $unitAmount * $quantity; break; } - $values .= '('.(int)$idBookingDemand.','.(int)$idTax.','.(float)$unitAmount.','. + $values .= '('.(int)$this->id.','.(int)$idTax.','.(float)$unitAmount.','. (float)$totalAmount.'),'; } + + // if delete previous details and save new details + if ($replace) { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'htl_booking_demands_tax` WHERE id_booking_demand='.(int)$this->id); + } + $values = rtrim($values, ','); $sql = 'INSERT INTO `'._DB_PREFIX_.'htl_booking_demands_tax` (id_booking_demand, id_tax, unit_amount, total_amount) diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 8f2b3ad49..f721a255b 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -168,6 +168,23 @@ class HotelBookingDetail extends ObjectModel parent::__construct($id); } + public function update($null_values = false) + { + $result = parent::update($null_values); + + // if automatic overbooking resolution is enabled + if (Configuration::get('PS_OVERBOOKING_AUTO_RESOLVE')) { + // if room is getting free and this room is not already in back order then resolve the overbookings for this free room + // $this->is_cancelled == 1 is not checked because currently we always set is_refunded to 1 when room is free + // $this->is_back_order == 0 is checked because $this->is_back_order == 1 is used as room is free + if ($this->is_refunded == 1 && $this->is_back_order == 0) { + $this->resolveOverBookings(); + } + } + + return $result; + } + public function getBookingDataParams($params) { if (!isset($params['id_room_type'])) { @@ -508,6 +525,8 @@ class HotelBookingDetail extends ObjectModel $sql = $sql.' UNION '.$sql3; } + $sql .= ' ORDER BY id_room ASC'; + $unavailRoomTypes = array(); if ($unavailRooms = Db::getInstance()->executeS($sql)) { foreach ($unavailRooms as $unavailRoomDetail) { @@ -629,8 +648,8 @@ class HotelBookingDetail extends ObjectModel $whereAvailRoomSearch = 'WHERE ri.`id_hotel`='.(int)$idHotel.' AND ri.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE.' AND ri.`id` NOT IN ('.$exclude_ids.') AND IF('.(int)$idRoomType.' > 0, ri.`id_product` = '.(int)$idRoomType.', 1) AND ri.`id_product` IN ('.$allowedIdRoomTypes.')'; $groupByAvailRoomSearch = ''; - $orderByAvailRoomSearch = ''; - $orderWayAvailRoomSearch = ''; + $orderByAvailRoomSearch = 'ORDER BY ri.`id`'; + $orderWayAvailRoomSearch = 'ASC'; Hook::exec('actionAvailRoomSearchSqlModifier', array( @@ -930,7 +949,7 @@ class HotelBookingDetail extends ObjectModel (hrdd.`date_from` > \''.pSQL($dateFrom).'\' AND hrdd.`date_from` < \''.pSQL($dateTo).'\' AND hrdd.`date_to` < \''.pSQL($dateTo).'\') ) AND IF('.(int)$idRoomType.' > 0, hri.`id_product` = '.(int)$idRoomType.', 1) AND hri.`id_product` IN ('.$allowedIdRoomTypes.')'; - $sql = $sql1.' UNION '.$sql2; + $sql = $sql1.' UNION '.$sql2.' ORDER BY id_room ASC'; $part_arr = Db::getInstance()->executeS($sql); // Get date wise available rooms @@ -1221,10 +1240,11 @@ class HotelBookingDetail extends ObjectModel { extract($params); - $sql = 'SELECT bd.`id_product`, bd.`id_room`, bd.`id_hotel`, bd.`id_customer`, bd.`booking_type`, bd.`id_status` AS booking_status, bd.`comment`, rf.`room_num`, bd.`date_from`, bd.`date_to` + $sql = 'SELECT bd.`id`, bd.`id_product`, bd.`id_room`, bd.`id_hotel`, bd.`id_customer`, bd.`booking_type`, bd.`id_status` AS booking_status, bd.`comment`, rf.`room_num`, bd.`date_from`, bd.`date_to` FROM `'._DB_PREFIX_.'htl_booking_detail` AS bd INNER JOIN `'._DB_PREFIX_.'htl_room_information` AS rf ON (rf.`id` = bd.`id_room`) - WHERE bd.`id_hotel`='.(int)$idHotel.' AND bd.`is_refunded` = 0 AND bd.`is_back_order` = 0 AND IF(bd.`id_status` = '. self::STATUS_CHECKED_OUT .', bd.`date_from` <= \''.pSQL($dateFrom).'\' AND bd.`check_out` >= \''.pSQL($dateTo).'\', bd.`date_from` <= \''.pSQL($dateFrom).'\' AND bd.date_to >= \''.pSQL($dateTo).'\') AND IF('.(int)$idRoomType.' > 0, rf.`id_product` = '.(int)$idRoomType.', 1) AND rf.`id_product` IN ('.$allowedIdRoomTypes.')'; + WHERE bd.`id_hotel`='.(int)$idHotel.' AND bd.`is_refunded` = 0 AND bd.`is_back_order` = 0 AND IF(bd.`id_status` = '. self::STATUS_CHECKED_OUT .', bd.`date_from` <= \''.pSQL($dateFrom).'\' AND bd.`check_out` >= \''.pSQL($dateTo).'\', bd.`date_from` <= \''.pSQL($dateFrom).'\' AND bd.date_to >= \''.pSQL($dateTo).'\') AND IF('.(int)$idRoomType.' > 0, rf.`id_product` = '.(int)$idRoomType.', 1) AND rf.`id_product` IN ('.$allowedIdRoomTypes.') + ORDER BY bd.`id_room` ASC'; $bookedRoomTypes = array(); if ($booked_rooms = Db::getInstance()->executeS($sql)) { @@ -1239,6 +1259,7 @@ class HotelBookingDetail extends ObjectModel ); } $bookedRoomTypes[$booked_v['id_product']][$booked_v['id_room']]['detail'][] = array( + 'id_htl_booking' => $booked_v['id'], 'date_from' => $booked_v['date_from'], 'date_to' => $booked_v['date_to'], 'id_customer' => $booked_v['id_customer'], @@ -1620,7 +1641,7 @@ class HotelBookingDetail extends ObjectModel * * @return [array|false] [Returs array of the available rooms for swapping if rooms found else returnss false] */ - public function getAvailableRoomsForReallocation($date_from, $date_to, $id_room_type, $hotel_id) + public function getAvailableRoomsForReallocation($date_from, $date_to, $id_room_type, $hotel_id, $room_types_to_upgrade = 0) { $context = Context::getContext(); if (isset($context->cookie->id_cart)) { @@ -1633,14 +1654,14 @@ class HotelBookingDetail extends ObjectModel SELECT hri.`id` AS id_room FROM `'._DB_PREFIX_.'htl_room_information` AS hri INNER JOIN `'._DB_PREFIX_.'htl_room_disable_dates` AS hrdd ON (hrdd.`id_room_type` = hri.`id_product` AND hrdd.`id_room` = hri.`id`) - WHERE hri.`id_hotel`='.(int)$hotel_id.' AND hri.`id_product` ='.(int)$id_room_type.' + WHERE hri.`id_hotel`='.(int)$hotel_id.($id_room_type ? ' AND `id_product` = '.(int)$id_room_type : '').' AND hri.`id_status` = '. HotelRoomInformation::STATUS_TEMPORARY_INACTIVE .' AND (hrdd.`date_from` <= \''.pSql($date_to).'\' AND hrdd.`date_to` >= \''.pSql($date_from).'\')'; if (isset($current_admin_cart_id) && $current_admin_cart_id) { $sql = 'SELECT `id` AS `id_room`, `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment` FROM `'._DB_PREFIX_.'htl_room_information` - WHERE `id_hotel`='.(int)$hotel_id.' AND `id_product`='.(int)$id_room_type.' + WHERE `id_hotel`='.(int)$hotel_id.($id_room_type ? ' AND `id_product` = '.(int)$id_room_type : '').' AND (id_status = '. HotelRoomInformation::STATUS_ACTIVE .' or id_status = '. HotelRoomInformation::STATUS_TEMPORARY_INACTIVE .') AND `id` NOT IN ('.$exclude_ids.') AND `id` NOT IN (SELECT `id_room` FROM `'._DB_PREFIX_.'htl_cart_booking_data` WHERE `id_cart`='. @@ -1648,12 +1669,26 @@ class HotelBookingDetail extends ObjectModel } else { $sql = 'SELECT `id` AS `id_room`, `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment` FROM `'._DB_PREFIX_.'htl_room_information` - WHERE `id_hotel`='.(int)$hotel_id.' AND `id_product`='.(int)$id_room_type.' + WHERE `id_hotel`='.(int)$hotel_id.($id_room_type ? ' AND `id_product` = '.(int)$id_room_type : '').' AND (id_status = '. HotelRoomInformation::STATUS_ACTIVE .' or id_status = '. HotelRoomInformation::STATUS_TEMPORARY_INACTIVE .') AND `id` NOT IN ('.$exclude_ids.')'; } - $avail_rooms = Db::getInstance()->executeS($sql); - if ($avail_rooms) { + + if ($avail_rooms = Db::getInstance()->executeS($sql)) { + // if requested for room type upgrade options also then get room type upgrade options + if ($room_types_to_upgrade) { + $availableRoomTypes = array(); + $context = Context::getContext(); + foreach ($avail_rooms as $roomInfo) { + $availableRoomTypes[$roomInfo['id_product']]['id_product'] = $roomInfo['id_product']; + $objProduct = new Product($roomInfo['id_product'], false, $context->language->id); + $availableRoomTypes[$roomInfo['id_product']]['room_type_name'] = $objProduct->name; + $availableRoomTypes[$roomInfo['id_product']]['rooms'][] = $roomInfo; + } + + return $availableRoomTypes; + } + return $avail_rooms; } @@ -1671,74 +1706,149 @@ class HotelBookingDetail extends ObjectModel */ public function getAvailableRoomsForSwapping($date_from, $date_to, $id_room_type, $hotel_id, $id_room) { - $sql = 'SELECT `id` AS `id_room`, `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment` - FROM `'._DB_PREFIX_.'htl_room_information` - WHERE `id_hotel`='.(int)$hotel_id.' AND `id_product`='.(int)$id_room_type.' - AND (id_status = '. HotelRoomInformation::STATUS_ACTIVE .' or id_status = '. HotelRoomInformation::STATUS_TEMPORARY_INACTIVE .') - AND `id` IN ( - SELECT `id_room` FROM `'._DB_PREFIX_.'htl_booking_detail` - WHERE `date_from` = \''.pSQL($date_from).'\' AND `date_to` = \''.pSQL($date_to).'\' - AND `id_room`!='.(int)$id_room.' AND `is_refunded`=0 AND `is_back_order`=0 - )'; + $sql = 'SELECT `id` as `id_hotel_booking`, `id_room`, `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment` + FROM `'._DB_PREFIX_.'htl_booking_detail` + WHERE `id_hotel` = '.(int)$hotel_id.' AND `id_product` = '.(int)$id_room_type.' + AND `date_from` = \''.pSQL($date_from).'\' AND `date_to` = \''.pSQL($date_to).'\' + AND `id_room`!='.(int)$id_room.' AND `is_refunded` = 0 AND `is_back_order` = 0'; return Db::getInstance()->executeS($sql); } /** + * @deprecated : use reallocateBooking() instead * [reallocateRoomWithAvailableSameRoomType :: To reallocate rooms with available rooms in case of reallocation of the room]. - * @param [int] $current_room_id [Id of the room to be reallocated] - * @param [date] $date_from [start date of the booking of the room] - * @param [date] $date_to [end date of the booking of the room] - * @param [date] $swapped_room_id [Id of the room with which the $current_room_id will be reallocated] - * + * @param [int] $currentRoomId [id of the room to be reallocated] + * @param [date] $dateFrom [start date of the booking of the room] + * @param [date] $dateTo [end date of the booking of the room] + * @param [date] $swappedRoomId [id of the room with which the $current_room_id will be reallocated] + * @param [int] $idOrder [id of the order] * @return [boolean] [true if rooms successfully reallocated else returns false] */ - public function reallocateRoomWithAvailableSameRoomType($currentRoomId, $dateFrom, $dateTo, $swappedRoomId) + public function reallocateRoomWithAvailableSameRoomType($currentRoomId, $dateFrom, $dateTo, $swappedRoomId, $idOrder = 0) { + $result = false; + $dateFrom = date('Y-m-d H:i:s', strtotime($dateFrom)); $dateTo = date('Y-m-d H:i:s', strtotime($dateTo)); - $idHotelCartBookingData = Db::getInstance()->getValue( - 'SELECT `id` - FROM `'._DB_PREFIX_.'htl_cart_booking_data` - WHERE date_from = "'.pSQL($dateFrom).'" AND date_to = "'.pSQL($dateTo).'" - AND id_room = '.(int) $currentRoomId - ); - - if ($idHotelCartBookingData) { - $objHotelCartBookingData = new HotelCartBookingData($idHotelCartBookingData); - if (Validate::isLoadedObject($objHotelCartBookingData)) { - $objHotelCartBookingData->id_room = $swappedRoomId; - if ($objHotelCartBookingData->save()) { - $objHotelRoomInformation = new HotelRoomInformation($swappedRoomId); - - $roomBookingData = $this->getRoomBookingData($currentRoomId, $objHotelCartBookingData->id_order, $dateFrom, $dateTo); - $objHotelBookingDetail = new self($roomBookingData['id']); - if (Validate::isLoadedObject($objHotelBookingDetail)) { - $objHotelBookingDetail->id_room = $swappedRoomId; - $objHotelBookingDetail->room_num = $objHotelRoomInformation->room_num; - if ($objHotelBookingDetail->save()) { - Hook::exec( - 'actionRoomReAllocateAfter', - array( - 'room_id' => $currentRoomId, - 'realloc_room_id' => $swappedRoomId, - 'date_from' => $dateFrom, - 'date_to' => $dateTo, - ) - ); - - return true; - } - } - } - } + if ($idHotelBooking = Db::getInstance()->getValue( + 'SELECT `id` FROM `'._DB_PREFIX_.'htl_booking_detail` + WHERE date_from = \''.pSQL($dateFrom).'\' + AND date_to = \''.pSQL($dateTo).'\' + AND id_room = '.(int) $currentRoomId. + ((int) $idOrder ? ' AND id_order = '.(int) $idOrder : '') + )) { + $result = $this->reallocateBooking($idHotelBooking, $swappedRoomId); } - return false; + return $result; } /** + * Reallocate the room in the booking with the available sent room + * @param [int] $idHotelBooking : id of the hotel booking which room has to be reallocated + * @param [int] $idRoom : id of the room which has to assigned in reallocation + * @return boolean + */ + public function reallocateBooking($idHotelBooking, $idRoom, $priceDiffTaxExcl = 0) + { + $result = true; + // get the cart booking data for the given booking + if (Validate::isLoadedObject($objHotelBooking = new HotelBookingDetail($idHotelBooking))) { + $objHotelCartBooking = new HotelCartBookingData(); + if ($cartBookingInfo = $objHotelCartBooking->getRoomRowByIdProductIdRoomInDateRange( + $objHotelBooking->id_cart, + $objHotelBooking->id_product, + $objHotelBooking->date_from, + $objHotelBooking->date_to, + $objHotelBooking->id_room + )) { + // Reallocate the rooms in the room cart booking table + if (Validate::isLoadedObject($objHotelCartBooking = new HotelCartBookingData($cartBookingInfo['id']))) { + $objHotelCartBooking->id_room = $idRoom; + $result &= $objHotelCartBooking->save(); + } + } + + // Reallocate the rooms in the room booking table + $objHotelRoomInfo = new HotelRoomInformation($idRoom); + $idNewRoomType = $objHotelRoomInfo->id_product; + if ($objHotelBooking->id_product != $idNewRoomType) { + $objHotelBooking->id_product = $idNewRoomType; + $objProduct = new Product($idNewRoomType, false, Configuration::get('PS_LANG_DEFAULT')); + $objHotelBooking->room_type_name = $objProduct->name; + + // change product name in order detail table + $objOrderDetail = new OrderDetail((int) $objHotelBooking->id_order_detail); + $objOrderDetail->product_name = $objProduct->name; + + // manage the prices in the order tables for the price diffrence + if ($priceDiffTaxExcl != 0) { + $taxCalculator = $objOrderDetail->getTaxCalculator(); + $priceDiffTaxIncl = Tools::ps_round($taxCalculator->addTaxes($priceDiffTaxExcl), _PS_PRICE_COMPUTE_PRECISION_); + + // set price changes in htl_booking_detail table + $objHotelBooking->total_price_tax_excl += (float)$priceDiffTaxExcl; + $objHotelBooking->total_price_tax_incl += (float)$priceDiffTaxIncl; + + // set price changes in order_detail table + $roomTypeTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( + $idNewRoomType, + $objHotelBooking->date_from, + $objHotelBooking->date_to + ); + + $objOrderDetail->unit_price_tax_excl = Product::getPriceStatic($idNewRoomType, false, null, _PS_PRICE_COMPUTE_PRECISION_); + $objOrderDetail->unit_price_tax_incl = Tools::ps_round( + $taxCalculator->addTaxes($objOrderDetail->unit_price_tax_excl), + _PS_PRICE_COMPUTE_PRECISION_ + ); + + $objOrderDetail->total_price_tax_excl += (float)$priceDiffTaxExcl; + $objOrderDetail->total_price_tax_incl += (float)$priceDiffTaxIncl; + + // set price changes in orders table + $objOrder = new Order($objOrderDetail->id_order); + $objOrder->total_products += (float)$priceDiffTaxExcl; + $objOrder->total_products_wt += (float)$priceDiffTaxIncl; + $objOrder->total_paid += (float)$priceDiffTaxIncl; + $objOrder->total_paid_tax_excl += (float)$priceDiffTaxExcl; + $objOrder->total_paid_tax_incl += (float)$priceDiffTaxIncl; + + $result &= $objOrder->update(); + + // update taxes in order detail + $result &= $objOrderDetail->updateTaxAmount($objOrder); + } + + $result &= $objOrderDetail->update(); + } + + $objHotelBooking->id_room = $idRoom; + $objHotelBooking->room_num = $objHotelRoomInfo->room_num; + // set backorder to 0 as available reallocate rooms will always be free + $objHotelBooking->is_back_order = 0; + $result &= $objHotelBooking->save(); + + if ($result) { + Hook::exec( + 'actionRoomReallocateAfter', + array( + 'id_htl_booking' => $idHotelBooking, + 'id_room' => $idRoom + ) + ); + } + } else { + $result = false; + } + + return $result; + } + + /** + * @deprecated : use swapBooking() instead * [swapRoomWithAvailableSameRoomType :: To swap rooms with available rooms in case of reallocation of the room]. * @param [int] $current_room_id [Id of the room to be swapped] * @param [date] $date_from [start date of the booking of the room] @@ -1747,70 +1857,107 @@ class HotelBookingDetail extends ObjectModel * * @return [boolean] [true if rooms successfully swapped else returns false] */ - public function swapRoomWithAvailableSameRoomType($currentRoomId, $dateFrom, $dateTo, $swappedRoomId) + public function swapRoomWithAvailableSameRoomType($idRoomFrom, $dateFrom, $dateTo, $idRoomTo, $idOrderFrom = 0, $idOrderTo = 0) { + $result = false; + $dateFrom = date('Y-m-d H:i:s', strtotime($dateFrom)); $dateTo = date('Y-m-d H:i:s', strtotime($dateTo)); - $idHotelCartBookingData1 = Db::getInstance()->getValue( - 'SELECT `id` FROM `'._DB_PREFIX_.'htl_cart_booking_data` WHERE `is_refunded` = 0 - AND `date_from`=\''.pSQL($dateFrom).'\' AND `date_to`=\''.pSQL($dateTo).'\' - AND `id_room`='.(int)$swappedRoomId - ); - $idHotelCartBookingData2 = Db::getInstance()->getValue( - 'SELECT `id` FROM `'._DB_PREFIX_.'htl_cart_booking_data` WHERE `is_refunded` = 0 - AND `date_from`=\''.pSQL($dateFrom).'\' AND `date_to`=\''.pSQL($dateTo).'\' - AND `id_room`='.(int)$currentRoomId - ); - - $idHotelBookingDetail1 = Db::getInstance()->getValue( + // Get the booking details for the given rooms as per given parameters + $idHotelBookingFrom = Db::getInstance()->getValue( 'SELECT `id` FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `is_refunded` = 0 - AND `date_from`=\''.pSQL($dateFrom).'\' AND `date_to`=\''.pSQL($dateTo).'\' - AND `id_room`='.(int)$swappedRoomId + AND `date_from`=\''.pSQL($dateFrom).'\' + AND `date_to`=\''.pSQL($dateTo).'\' + AND `id_room`='.(int)$idRoomFrom. + ((int) $idOrderFrom ? ' AND id_order = '.(int) $idOrderFrom : '') ); - $idHotelBookingDetail2 = Db::getInstance()->getValue( + + $idHotelBookingTo = Db::getInstance()->getValue( 'SELECT `id` FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `is_refunded` = 0 - AND `date_from`=\''.pSQL($dateFrom).'\' AND `date_to`=\''.pSQL($dateTo).'\' - AND `id_room`='.(int)$currentRoomId + AND `date_from`=\''.pSQL($dateFrom).'\' + AND `date_to`=\''.pSQL($dateTo).'\' + AND `id_room`='.(int)$idRoomTo. + ((int) $idOrderTo ? ' AND id_order = '.(int) $idOrderTo : '') ); - $objHotelCartBookingData1 = new HotelCartBookingData($idHotelCartBookingData1); - $objHotelCartBookingData2 = new HotelCartBookingData($idHotelCartBookingData2); - - $temp = $objHotelCartBookingData1->id_room; - $objHotelCartBookingData1->id_room = $objHotelCartBookingData2->id_room; - $objHotelCartBookingData2->id_room = $temp; - - $objHotelBookingDetail1 = new HotelBookingDetail($idHotelBookingDetail1); - $objHotelBookingDetail2 = new HotelBookingDetail($idHotelBookingDetail2); - - $temp = $objHotelBookingDetail1->id_room; - $objHotelBookingDetail1->id_room = $objHotelBookingDetail2->id_room; - $objHotelBookingDetail2->id_room = $temp; - - $temp = $objHotelBookingDetail1->room_num; - $objHotelBookingDetail1->room_num = $objHotelBookingDetail2->room_num; - $objHotelBookingDetail2->room_num = $temp; - - if ($objHotelCartBookingData1->save() - && $objHotelCartBookingData2->save() - && $objHotelBookingDetail1->save() - && $objHotelBookingDetail2->save() - ) { - Hook::exec( - 'actionRoomSwapAfter', - array( - 'room_id' => $currentRoomId, - 'swapped_room_id' => $swappedRoomId, - 'date_from' => $dateFrom, - 'date_to' => $dateTo, - ) - ); - - return true; + if ($idHotelBookingFrom && $idHotelBookingTo) { + $result = $this->swapBooking($idHotelBookingFrom, $idHotelBookingTo); } - return false; + return $result; + } + + public function swapBooking($idHotelBookingFrom, $idHotelBookingTo) + { + $result = true; + // get the cart booking data for the given booking + if (Validate::isLoadedObject($objHotelBookingFrom = new HotelBookingDetail($idHotelBookingFrom)) + && Validate::isLoadedObject($objHotelBookingTo = new HotelBookingDetail($idHotelBookingTo)) + ) { + // Swap the rooms in the room cart booking table + $objHotelCartBooking = new HotelCartBookingData(); + $cartBookingInfoFrom = $objHotelCartBooking->getRoomRowByIdProductIdRoomInDateRange( + $objHotelBookingFrom->id_cart, + $objHotelBookingFrom->id_product, + $objHotelBookingFrom->date_from, + $objHotelBookingFrom->date_to, + $objHotelBookingFrom->id_room + ); + $cartBookingInfoTo = $objHotelCartBooking->getRoomRowByIdProductIdRoomInDateRange( + $objHotelBookingTo->id_cart, + $objHotelBookingTo->id_product, + $objHotelBookingTo->date_from, + $objHotelBookingTo->date_to, + $objHotelBookingTo->id_room + ); + + if ($cartBookingInfoFrom && $cartBookingInfoTo) { + if (Validate::isLoadedObject($objHotelCartBookingFrom = new HotelCartBookingData($cartBookingInfoFrom['id'])) + && Validate::isLoadedObject($objHotelCartBookingTo = new HotelCartBookingData($cartBookingInfoTo['id'])) + ) { + $objHotelCartBookingFrom->id_room = $objHotelCartBookingTo->id_room; + $objHotelCartBookingTo->id_room = $objHotelCartBookingFrom->id_room; + $result &= $objHotelCartBookingFrom->save(); + $result &= $objHotelCartBookingTo->save(); + } + } + + // Swap the rooms in the room booking table + // also transfer the backorder status of the room from which room is being swapped + $idRoomFrom = $objHotelBookingFrom->id_room; + $roomNumFrom = $objHotelBookingFrom->room_num; + $roomFromBackOrder = $objHotelBookingFrom->is_back_order; + + $idRoomTo = $objHotelBookingTo->id_room; + $roomNumTo = $objHotelBookingTo->room_num; + $roomToBackOrder = $objHotelBookingTo->is_back_order; + + $objHotelBookingFrom->id_room = $idRoomTo; + $objHotelBookingFrom->room_num = $roomNumTo; + $objHotelBookingFrom->is_back_order = $roomToBackOrder; + + $objHotelBookingTo->id_room = $idRoomFrom; + $objHotelBookingTo->room_num = $roomNumFrom; + $objHotelBookingTo->is_back_order = $roomFromBackOrder; + + $result &= $objHotelBookingFrom->save(); + $result &= $objHotelBookingTo->save(); + + if ($result) { + Hook::exec( + 'actionRoomSwapAfter', + array( + 'id_htl_booking_from' => $idHotelBookingFrom, + 'id_htl_booking_to' => $idHotelBookingTo + ) + ); + } + } else { + $result = false; + } + + return $result; } /** @@ -1826,6 +1973,7 @@ class HotelBookingDetail extends ObjectModel { $table = 'htl_booking_detail'; $data = array('is_refunded' => (int) $is_refunded); + if ($id_rooms) { foreach ($id_rooms as $key_rm => $val_rm) { $where = 'id_order='.(int)$id_order.' AND id_room = '.(int)$val_rm['id_room'].' AND `date_from`= \''. @@ -1833,8 +1981,15 @@ class HotelBookingDetail extends ObjectModel $result = Db::getInstance()->update($table, $data, $where); } } else { - return Db::getInstance()->update($table, $data, 'id_order='.(int)$id_order); + $result = Db::getInstance()->update($table, $data, 'id_order='.(int)$id_order); } + + // if automatic overbooking resolution is enabled + if ($result && Configuration::get('PS_OVERBOOKING_AUTO_RESOLVE') && $is_refunded) { + // if room is getting free and this room is not already in back order then resolve the overbookings for this free room + $this->resolveOverBookings(); + } + return $result; } @@ -1944,29 +2099,6 @@ class HotelBookingDetail extends ObjectModel $newTotalPriceTI = $unitRoomPriceTI * $newNumDays; } - // calculate `total_paid_amount` - $totalPaidAmount = 0; - $isAdvancePayment = Db::getInstance()->getValue( - 'SELECT o.`is_advance_payment` - FROM `'._DB_PREFIX_.'orders` o - WHERE o.`id_order` = '.(int) $idOrder - ); - - if ($isAdvancePayment) { - $objHotelAdvancedPayment = new HotelAdvancedPayment(); - $productAdvancePayment = $objHotelAdvancedPayment->getIdAdvPaymentByIdProduct($objHotelBookingDetail->id_product); - - if (!$productAdvancePayment || (isset($productAdvancePayment['payment_type']) && $productAdvancePayment['payment_type'])) { - $totalPaidAmount = $objHotelAdvancedPayment->getRoomMinAdvPaymentAmount( - $objHotelBookingDetail->id_product, - $newDateFrom, - $newDateTo - ); - } - } else { - $totalPaidAmount = $newTotalPriceTI; - } - // update $objHotelCartBookingData $objHotelCartBookingData->date_from = $newDateFrom; $objHotelCartBookingData->date_to = $newDateTo; @@ -1980,7 +2112,6 @@ class HotelBookingDetail extends ObjectModel $objHotelBookingDetail->date_to = $newDateTo; $objHotelBookingDetail->total_price_tax_excl = Tools::ps_round($newTotalPriceTE, 6); $objHotelBookingDetail->total_price_tax_incl = Tools::ps_round($newTotalPriceTI, 6); - $objHotelBookingDetail->total_paid_amount = Tools::ps_round($totalPaidAmount, 6); $objHotelBookingDetail->adults = $occupancy['adults']; $objHotelBookingDetail->children = $occupancy['children']; $objHotelBookingDetail->child_ages = json_encode($occupancy['child_ages']); @@ -2030,17 +2161,20 @@ class HotelBookingDetail extends ObjectModel $objHtlBranchInfo = new HotelBranchInformation(); foreach ($order_detail_data as $key => $value) { - $product_image_id = Product::getCover($value['id_product']); - $link_rewrite = ((new Product((int) $value['id_product'], Configuration::get('PS_LANG_DEFAULT')))->link_rewrite[Configuration::get('PS_LANG_DEFAULT')]); - - if ($product_image_id) { - $order_detail_data[$key]['image_link'] = $context->link->getImageLink($link_rewrite, $product_image_id['id_image'], 'small_default'); + $order_detail_data[$key]['room_type'] = $value['room_type_name']; + // Check if product is still available + if (Validate::isLoadedObject($objProduct = new Product((int) $value['id_product'], Configuration::get('PS_LANG_DEFAULT'))) + && $productCoverImg = Product::getCover($value['id_product']) + ) { + $order_detail_data[$key]['image_link'] = $context->link->getImageLink( + $objProduct->link_rewrite[Configuration::get('PS_LANG_DEFAULT')], + $productCoverImg['id_image'], 'small_default' + ); } else { - $order_detail_data[$key]['image_link'] = $context->link->getImageLink($link_rewrite, $context->language->iso_code.'-default', 'small_default'); + $order_detail_data[$key]['image_link'] = $context->link->getImageLink('', $context->language->iso_code.'-default', 'small_default'); } $objOrderDetail = new OrderDetail($value['id_order_detail']); - $order_detail_data[$key]['room_type'] = $objOrderDetail->product_name; $order_detail_data[$key]['original_unit_price_tax_excl'] = $objOrderDetail->unit_price_tax_excl; $order_detail_data[$key]['original_unit_price_tax_incl'] = $objOrderDetail->unit_price_tax_incl; $order_detail_data[$key]['unit_price_without_reduction_tax_excl'] = $objOrderDetail->unit_price_tax_excl + $objOrderDetail->reduction_amount_tax_excl; @@ -2080,6 +2214,20 @@ class HotelBookingDetail extends ObjectModel ); } + public function getLastInsertedRoomIdOrderDetail($id_order) + { + return Db::getInstance()->getValue( + 'SELECT MAX(`id_order_detail`) FROM `'._DB_PREFIX_.'order_detail` WHERE `is_booking_product` = 1 AND `id_order`='.(int)$id_order + ); + } + + public function getLastInsertedServiceIdOrderDetail($id_order, $id_product) + { + return Db::getInstance()->getValue( + 'SELECT MAX(`id_order_detail`) FROM `'._DB_PREFIX_.'order_detail` WHERE `is_booking_product` = 0 AND `product_id`='.(int) $id_product.' AND `id_order`='.(int)$id_order + ); + } + /** * [getOnlyOrderBookingData description]. * @param [type] $id_order [description] @@ -2703,4 +2851,372 @@ class HotelBookingDetail extends ObjectModel Configuration::get('PS_OS_ERROR'), )); } -} \ No newline at end of file + + // process the booking tables changes when a booking refund/cancellation is processed + public function processRefundInBookingTables() + { + if (Validate::isLoadedObject($this)) { + $reduction_amount = array( + 'total_price_tax_excl' => 0, + 'total_price_tax_incl' => 0, + 'total_products_tax_excl' => 0, + 'total_products_tax_incl' => 0, + ); + $objOrder = new Order($this->id_order); + $orderTotalPaid = $objOrder->getTotalPaid(); + + // things to do if order is not paid + if ((float) $orderTotalPaid <= 0) { + $objHotelBookingDemands = new HotelBookingDemands(); + $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail(); + + $reduction_amount['total_price_tax_excl'] = Tools::ps_round((float) $this->total_price_tax_excl, 6); + $reduction_amount['total_products_tax_excl'] = Tools::ps_round((float) $this->total_price_tax_excl, 6); + $reduction_amount['total_price_tax_incl'] = Tools::ps_round((float) $this->total_price_tax_incl, 6); + $reduction_amount['total_products_tax_incl'] = Tools::ps_round((float) $this->total_price_tax_incl, 6); + + // reduce facilities amount from order and services_detail + if ($roomDemands = $objHotelBookingDemands->getRoomTypeBookingExtraDemands( + $this->id_order, + $this->id_product, + $this->id_room, + $this->date_from, + $this->date_to, + 0 + )) { + foreach ($roomDemands as $roomDemand) { + $objHotelBookingDemands = new HotelBookingDemands($roomDemand['id_booking_demand']); + $reduction_amount['total_price_tax_excl'] += Tools::ps_round((float) $objHotelBookingDemands->total_price_tax_excl, 6); + $reduction_amount['total_price_tax_incl'] += Tools::ps_round((float) $objHotelBookingDemands->total_price_tax_incl, 6); + $objHotelBookingDemands->total_price_tax_excl = 0; + $objHotelBookingDemands->total_price_tax_incl = 0; + $objHotelBookingDemands->save(); + } + } + + // reduce services amount from order and services_detail + if ($roomServices = $objRoomTypeServiceProductOrderDetail->getSelectedServicesForRoom( + $this->id + )) { + foreach ($roomServices['additional_services'] as $roomService) { + $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail( + $roomService['id_room_type_service_product_order_detail'] + ); + $reduction_amount['total_price_tax_excl'] += Tools::ps_round((float) $objRoomTypeServiceProductOrderDetail->total_price_tax_excl, 6); + $reduction_amount['total_products_tax_excl'] += Tools::ps_round((float) $objRoomTypeServiceProductOrderDetail->total_price_tax_excl, 6); + $reduction_amount['total_price_tax_incl'] += Tools::ps_round((float) $objRoomTypeServiceProductOrderDetail->total_price_tax_incl, 6); + $reduction_amount['total_products_tax_incl'] += Tools::ps_round((float) $objRoomTypeServiceProductOrderDetail->total_price_tax_incl, 6); + + if (Validate::isLoadedObject($objOrderDetail = new OrderDetail($objRoomTypeServiceProductOrderDetail->id_order_detail))) { + $objOrderDetail->product_quantity_refunded += $objRoomTypeServiceProductOrderDetail->quantity; + if ($objOrderDetail->product_quantity_refunded > $objOrderDetail->product_quantity) { + $objOrderDetail->product_quantity_refunded = $objOrderDetail->product_quantity; + } + + $objOrderDetail->total_price_tax_excl -= Tools::ps_round((float) $objRoomTypeServiceProductOrderDetail->total_price_tax_excl, 6); + $objOrderDetail->total_price_tax_incl -= Tools::ps_round((float) $objRoomTypeServiceProductOrderDetail->total_price_tax_incl, 6); + + $objOrderDetail->save(); + } + + $objRoomTypeServiceProductOrderDetail->total_price_tax_excl = 0; + $objRoomTypeServiceProductOrderDetail->total_price_tax_incl = 0; + $objRoomTypeServiceProductOrderDetail->save(); + } + } + } + + // enter refunded quantity in the order detail table + $idOrderDetail = $this->id_order_detail; + if (Validate::isLoadedObject($objOrderDetail = new OrderDetail($idOrderDetail))) { + $numDays = $this->getNumberOfDays( + $this->date_from, + $this->date_to + ); + + $objOrderDetail->product_quantity_refunded += $numDays; + if ($objOrderDetail->product_quantity_refunded > $objOrderDetail->product_quantity) { + $objOrderDetail->product_quantity_refunded = $objOrderDetail->product_quantity; + } + + if ((float) $orderTotalPaid <= 0) { + // reduce room amount from order and order detail + $objOrderDetail->total_price_tax_incl -= Tools::ps_round((float) $this->total_price_tax_incl, 6); + $objOrderDetail->total_price_tax_excl -= Tools::ps_round((float) $this->total_price_tax_excl, 6); + if (Validate::isLoadedObject($objOrder = new Order($this->id_order))) { + $objOrder->total_paid -= $reduction_amount['total_price_tax_incl']; + $objOrder->total_paid_tax_excl -= Tools::ps_round((float) $reduction_amount['total_price_tax_excl'], 6); + $objOrder->total_paid_tax_incl -= Tools::ps_round((float) $reduction_amount['total_price_tax_incl'], 6); + $objOrder->total_products -= Tools::ps_round((float) $reduction_amount['total_products_tax_excl'], 6); + $objOrder->total_products_wt -= Tools::ps_round((float) $reduction_amount['total_products_tax_incl'], 6); + $objOrder->save(); + } + } + + $objOrderDetail->save(); + } + + // as refund is completed then set the booking as refunded + $this->is_refunded = 1; + if ((float) $orderTotalPaid <= 0) { + // Reduce room amount from htl_booking_detail + $this->is_cancelled = 1; + $this->total_price_tax_excl = 0; + $this->total_price_tax_incl = 0; + } + + $this->save(); + + return true; + } + + return false; + } + + public function setBookingCancellationMessage($message, $byAdmin = 0) + { + if (Validate::isLoadedObject($this)) { + // First save the message for the admin for the refund + $objectMessage = new Message(); + $objectMessage->message = $message; + $objectMessage->id_cart = (int)$this->id_cart; + $objectMessage->id_customer = (int)($this->id_customer); + $objectMessage->id_order = (int)$this->id_order; + $objectMessage->private = 1; + + // If cancelled by admin then set the employee id who is doing this cancellation else put 0 + $context = Context::getContext(); + if ($byAdmin) { + $objectMessage->id_employee = (int)$context->employee->id; + } else { + $objectMessage->id_employee = 0; + } + + $objectMessage->add(); + + // save this message for the customer + $objCustomer = new Customer($this->id_customer); + $idCustomerThread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($objCustomer->email, $this->id_order); + if (!$idCustomerThread) { + $objCustomerThread = new CustomerThread(); + $objCustomerThread->id_contact = 0; + $objCustomerThread->id_customer = (int)$this->id_customer; + $objCustomerThread->id_shop = (int)$context->shop->id; + $objCustomerThread->id_order = (int)$this->id_order; + $objCustomerThread->id_lang = (int)$context->language->id; + $objCustomerThread->email = $objCustomer->email; + $objCustomerThread->status = 'open'; + $objCustomerThread->token = Tools::passwdGen(12); + $objCustomerThread->add(); + } else { + $objCustomerThread = new CustomerThread((int)$idCustomerThread); + } + + $objCustomerMessage = new CustomerMessage(); + $objCustomerMessage->id_customer_thread = $objCustomerThread->id; + + // If cancelled by admin then set the employee id who is doing this cancellation else put 0 + if ($byAdmin) { + $objCustomerMessage->id_employee = (int)$context->employee->id; + } else { + $objCustomerMessage->id_employee = 0; + } + + $objCustomerMessage->message = $message; + $objCustomerMessage->private = 0; + + $objCustomerMessage->add(); + + return true; + } + + return false; + } + + /** + * Get overbooked rooms in the order|hotel + * @param [int] $idOrder : id of the order + * @param [int] $idHotel : id of the hotel + * @param [string] $dateFrom + * @param [string] $dateTo + * @param [int] $datewiseBreakup : send 1 to get overbooked rooms in datewise breakup + * @param [int] $roomCount : send 1 to get the count of the rooms overbooked only + * @param [int] $bookedRoomFlag : send 0 for no action | send 1 to get booked room info | send 2 to get overbooked rooms which are free + * + * @return array | integer : array of overbooked rooms | count of overbooked rooms + */ + public function getOverbookedRooms( + $idOrder = 0, + $idHotel = 0, + $dateFrom = '', + $dateTo = '', + $datewiseBreakup = 0, + $roomCount = 0, + $bookedRoomInfoFlag = 0 + ) { + $result = array(); + + $sql = 'SELECT'; + if ($roomCount) { + $sql .= ' COUNT(*)'; + } else { + $sql .= ' *'; + } + + $sql .= ' FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `is_back_order` = 1 AND `is_refunded` = 0 AND `is_cancelled` = 0'; + + if ($idOrder) { + $sql .= ' AND `id_order` = '.(int) $idOrder; + } + if ($idHotel) { + $sql .= ' AND `id_hotel` = '.(int) $idHotel; + } + + if ($datewiseBreakup && $dateFrom && $dateTo) { + for ($currentDate = $dateFrom; $currentDate < $dateTo; $currentDate = date('Y-m-d', strtotime('+1 day', strtotime($currentDate)))) { + $dateSql = $sql . ' AND `date_from` <= \''.pSQL($currentDate).'\' AND `date_to` > \''.pSQL($currentDate).'\''; + + if ($roomCount) { + $result[$currentDate] = Db::getInstance()->getValue($dateSql); + } else { + $result[$currentDate] = Db::getInstance()->executeS($dateSql); + } + } + } else { + if ($dateFrom && $dateTo) { + $sql .= ' AND `date_from` < \''.pSQL($dateTo).'\' AND `date_to` > \''.pSQL($dateFrom).'\''; + } + + if ($roomCount) { + $result = Db::getInstance()->getValue($sql); + } else { + $result = Db::getInstance()->executeS($sql); + } + } + + if ($bookedRoomInfoFlag && !$roomCount && $result) { + $link = new Link(); + foreach ($result as $key => $bookingInfo) { + $result[$key]['booked_room_info'] = $this->chechRoomBooked($bookingInfo['id_room'], $bookingInfo['date_from'], $bookingInfo['date_to']); + $result[$key]['orders_filter_link'] = $link->getAdminLink('AdminOrders'); + + // if need only rooms which are available to resolve overbooking the unset booked rooms + if ($bookedRoomInfoFlag == 2 && $result[$key]['booked_room_info']) { + unset($result[$key]); + } + } + } + + return $result; + } + + /** + * Get all the orders which are in overbooking + * @param integer $onlyFutureDates : for orders which bookings dates are in future + * @return array + */ + public function getOverBookedOrders($onlyFutureDates = 0) + { + $sql = 'SELECT DISTINCT `id_order` FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `is_back_order` = 1 AND `is_refunded` = 0 AND `is_cancelled` = 0'; + + if ($onlyFutureDates) { + $sql .= ' AND `date_to` > \''.pSQL(date('Y-m-d')).'\''; + } + $sql .= ' ORDER BY `id_order` ASC'; + + $result = Db::getInstance()->executeS($sql); + + return array_column($result, 'id_order'); + } + + // Resolve overbookings by checking current available rooms + // Overbookings resolution will only be done if all overbookings are getting resolved in the order + public function resolveOverBookings($idHotelBooking = 0) + { + $result = false; + + $overBookedOrders = array(); + if ($idHotelBooking) { + if (Validate::isLoadedObject($objHtlBookingDetail = new HotelBookingDetail($idHotelBooking))) { + $overBookedOrders = array($objHtlBookingDetail->id_order); + } + } else { + $overBookedOrders = $this->getOverBookedOrders(1); + } + + if ($overBookedOrders) { + foreach ($overBookedOrders as $idOrder) { + // get all overbooked rooms in the order so that we can decide status of the order after overbooking resolved + $overBookedRooms = $this->getOverbookedRooms($idOrder); + $totalOverBookedInOrder = count($overBookedRooms); + + // if request for specific booking resolve + if ($idHotelBooking) { + $overBookedRooms = array((array)($objHtlBookingDetail)); + } + + if ($overBookedRooms) { + $resolvableOverbookings = array(); + foreach($overBookedRooms as $roomBooking) { + $params = array( + 'idHotel' => $roomBooking['id_hotel'], + 'dateFrom' => $roomBooking['date_from'], + 'dateTo' => $roomBooking['date_to'], + 'idRoomType' => $roomBooking['id_product'], + 'searchOccupancy' => 0, + 'allowedIdRoomTypes' => implode(",", array($roomBooking['id_product'])) + ); + + if ($availableRooms = $this->getSearchAvailableRooms($params)) { + if (isset($availableRooms['availableRoomTypes']['roomTypes'][$roomBooking['id_product']]['rooms']) + && $availableRooms['availableRoomTypes']['roomTypes'][$roomBooking['id_product']]['rooms'] + ) { + $availableRoomsInfo = $availableRooms['availableRoomTypes']['roomTypes'][$roomBooking['id_product']]['rooms']; + if ($roomIdsAvailable = array_column($availableRoomsInfo, 'id_room')) { + // If room is still there in the available rooms list then we can resolve its overbooking + if (in_array($roomBooking['id_room'], $roomIdsAvailable)) { + $resolvableOverbookings[] = $roomBooking['id']; + } + } + } + } + } + + // if request for specific booking Or all overbooked rooms are resolved then resolve the overbooking by setting is_back_order to 0 + if ($idHotelBooking || (count($resolvableOverbookings) == $totalOverBookedInOrder)) { + foreach ($resolvableOverbookings as $idHtlBookingDtl) { + $objBookingDetail = new HotelBookingDetail($idHtlBookingDtl); + $objBookingDetail->is_back_order = 0; + $objBookingDetail->update(); + + $result = true; + } + + // After all overbookings are resolved we can update the status of the order + if (count($resolvableOverbookings) == $totalOverBookedInOrder) { + $objOrder = new Order($idOrder); + $idOrderState = 0; + if ($objOrder->current_state == Configuration::get('PS_OS_OVERBOOKING_PAID')) { + $idOrderState = Configuration::get('PS_OS_PAYMENT_ACCEPTED'); + } elseif ($objOrder->current_state == Configuration::get('PS_OS_OVERBOOKING_PARTIAL_PAID')) { + $idOrderState = Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED'); + } elseif ($objOrder->current_state == Configuration::get('PS_OS_OVERBOOKING_UNPAID')) { + $idOrderState = Configuration::get('PS_OS_AWAITING_PAYMENT'); + } + + // if we have order state to change + if ($idOrderState) { + $objOrderHistory = new OrderHistory(); + $objOrderHistory->id_order = (int)$idOrder; + $objOrderHistory->changeIdOrderState((int)$idOrderState, $objOrder, true); + $objOrderHistory->add(); + } + } + } + } + } + } + + return $result; + } +} diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index b0cae319a..05af3c72b 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -44,25 +44,38 @@ class HotelBranchInformation extends ObjectModel 'multilang' => true, 'fields' => array( 'id_category' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), - 'email' => array('type' => self::TYPE_STRING,'validate' => 'isEmail', 'size' => 255), - 'rating' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), - 'check_in' => array('type' => self::TYPE_STRING), - 'check_out' => array('type' => self::TYPE_STRING), + 'email' => array('type' => self::TYPE_STRING,'validate' => 'isEmail', 'size' => 255, 'required' => true), + 'rating' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'check_in' => array('type' => self::TYPE_STRING, 'required' => true), + 'check_out' => array('type' => self::TYPE_STRING, 'required' => true), 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), - 'latitude' => array('type' => self::TYPE_FLOAT), - 'longitude' => array('type' => self::TYPE_FLOAT), + 'latitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'longitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), 'map_formated_address' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml'), 'map_input_text' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), 'active_refund' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), + //lang fields 'policies' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'lang' => true), - 'hotel_name' => array('type' => self::TYPE_STRING, 'lang' => true), + 'hotel_name' => array('type' => self::TYPE_STRING, 'lang' => true, 'required' => true, 'validate' => 'isGenericName'), 'description' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'lang' => true), 'short_description' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'lang' => true), ), ); + // Webservice fields + public $id_country; + public $id_state; + public $city; + public $zipcode; + public $address; + public $phone; + public $use_global_max_order_date; + public $max_order_date; + public $use_global_preparation_time; + public $preparation_time; + protected $webserviceParameters = array( 'objectsNodeName' => 'hotels', 'objectNodeName' => 'hotel', @@ -71,28 +84,43 @@ class HotelBranchInformation extends ObjectModel 'delete' => 'deleteWs', 'update' => 'updateWs', ), - 'fields' => array( + 'phone' => array('required' => true), + 'address' => array('required' => true), + 'id_country' => array( + 'required' => true, + 'xlink_resource'=> 'countries', + ), + 'id_state' => array( + 'xlink_resource'=> 'states', + ), + 'city' => array( + 'required' => true, + ), + 'zipcode' => array(), 'id_default_image' => array( 'getter' => 'getCoverWs', + 'setter' => 'setCoverWs', 'xlink_resource' => array( - 'resourceName' => 'hotel_images', + 'resourceName' => 'images', + 'subResourceName' => 'hotels' ) ), - 'max_order_date' => array( - 'getter' => 'getWsMaxOrderDate', - 'setter' => 'setWsMaxOrderDate', - ), + 'use_global_max_order_date' => array(), + 'max_order_date' => array(), + 'use_global_preparation_time' => array(), + 'preparation_time' => array(), + ), + 'hidden_fields' => array ( + 'id_category', ), - 'associations' => array( 'room_types' => array( 'setter' => false, 'resource' => 'room_types', 'fields' => array('id' => array()) ), - 'hotel_images' => array( - 'setter' => false, + 'images' => array( 'resource' => 'image', 'fields' => array('id' => array()) ), @@ -111,6 +139,25 @@ class HotelBranchInformation extends ObjectModel { $this->moduleInstance = Module::getInstanceByName('hotelreservationsystem'); parent::__construct($id, $id_lang, $id_shop); + + $this->use_global_max_order_date = $this->max_order_date = $this->use_global_preparation_time = $this->preparation_time = $this->id_country = $this->id_state = $this->city = $this->zipcode = $this->address = $this->phone = null; + if ($id) { + if ($hotelAddress = $this->getAddress($id)) { + $this->id_country = $hotelAddress['id_country']; + $this->id_state = $hotelAddress['id_state']; + $this->city = $hotelAddress['city']; + $this->zipcode = $hotelAddress['postcode']; + $this->address = $hotelAddress['address1']; + $this->phone = $hotelAddress['phone']; + } + + if ($hotelRestrictions = HotelOrderRestrictDate::getDataByHotelId($id)) { + $this->use_global_max_order_date = $hotelRestrictions['use_global_max_order_date']; + $this->max_order_date = $hotelRestrictions['max_order_date']; + $this->use_global_preparation_time = $hotelRestrictions['use_global_preparation_time']; + $this->preparation_time = $hotelRestrictions['preparation_time']; + } + } } public function add($autodate = true, $null_values = false) @@ -606,7 +653,7 @@ class HotelBranchInformation extends ObjectModel return $return; } - public function addCategory($name, $parent_cat = false, $group_ids, $ishotel = false, $idHotel = false) + public function addCategory($name, $parent_cat = false, $group_ids, $ishotel = false, $idHotel = false, $link_rewrite = false) { $context = Context::getContext(); if (!$parent_cat) { @@ -622,6 +669,15 @@ class HotelBranchInformation extends ObjectModel $catName, $parent_cat )) { + if (is_array($link_rewrite)) { + $objCategory = new Category($categoryExists['id_category']); + + foreach (Language::getLanguages() as $lang) { + $objCategory->link_rewrite[$lang['id_lang']] = $link_rewrite[$lang['id_lang']]; + } + + $objCategory->save(); + } return $categoryExists['id_category']; } else { $category = new Category(); @@ -635,7 +691,12 @@ class HotelBranchInformation extends ObjectModel $category->description[$lang['id_lang']] = $this->moduleInstance->l( 'Hotel Branch Category', 'HotelBranchInformation' ); - $category->link_rewrite[$lang['id_lang']] = Tools::link_rewrite($catName); + + if (is_array($link_rewrite)) { + $category->link_rewrite[$lang['id_lang']] = $link_rewrite[$lang['id_lang']]; + } else { + $category->link_rewrite[$lang['id_lang']] = Tools::link_rewrite($catName); + } } $category->id_parent = $parent_cat; $category->groupBox = $group_ids; @@ -764,6 +825,22 @@ class HotelBranchInformation extends ObjectModel return true; } + public function updateRoomTypeCategories() + { + if (!Validate::isLoadedObject($this)) { + return false; + } + + $hotelCategories = $this->getAllHotelCategories(); + $objHotelRoomType = new HotelRoomType(); + if ($roomTypes = $objHotelRoomType->getRoomTypeByHotelId($this->id, Context::getContext()->language->id)) { + foreach ($roomTypes as $roomType) { + $objProduct = new Product($roomType['id_product']); + $objProduct->updateCategories($hotelCategories); + } + } + } + public function isRefundable() { return (Configuration::get('WK_ORDER_REFUND_ALLOWED') && $this->active_refund); @@ -800,7 +877,7 @@ class HotelBranchInformation extends ObjectModel { if ($result = HotelImage::getCover($this->id)) { // we are sending id_hotel/id_image as per the url set for the hotel images - return $result['id_hotel'].'/'.$result['id']; + return $result['id']; } return false; } @@ -811,24 +888,26 @@ class HotelBranchInformation extends ObjectModel */ public function setCoverWs($id_image) { - // first unset the cover - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_image` SET `cover` = NULL - WHERE `id_hotel` = '.(int)$this->id); + if ($id_image) { + // first unset the cover + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_image` SET `cover` = NULL + WHERE `id_hotel` = '.(int)$this->id); - // set the sent id of the image to the cover of the hotel - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_image` SET `cover` = 1 WHERE `id_image` = '.(int)$id_image); + // set the sent id of the image to the cover of the hotel + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_image` SET `cover` = 1 WHERE `id` = '.(int)$id_image.' AND `id_hotel` = '.(int)$this->id); + } return true; } // Webservice:: function to prepare id parameter for hotel images in a hotel api - public function getWsHotelImages() + public function getWsImages() { $ids = array(); if ($hotelImages = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_image` WHERE `id_hotel` = '.(int)$this->id)) { foreach ($hotelImages as $key => $image) { // we are sending id_hotel/id_image as per the url set for the hotel images - $ids[$key]['id'] = $image['id_hotel'].'/'.$image['id']; + $ids[$key]['id'] = $image['id']; } } return $ids; @@ -852,7 +931,7 @@ class HotelBranchInformation extends ObjectModel ); foreach ($branchFeatures as $feature) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'htl_branch_features` (`id_hotel`, `feature_id`) VALUES ('.(int)$this->id.', '.(int)$feature['id'].')'); + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'htl_branch_features` (`id_hotel`, `feature_id`, `date_add`, `date_upd`) VALUES ('.(int)$this->id.', '.(int)$feature['id'].', NOW(), NOW())'); } return true; @@ -875,7 +954,7 @@ class HotelBranchInformation extends ObjectModel ); foreach ($refundRules as $rule) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'htl_branch_refund_rules` (`id_hotel`, `id_refund_rule`) VALUES ('.(int)$this->id.', '.(int)$rule['id'].')'); + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'htl_branch_refund_rules` (`id_hotel`, `id_refund_rule`, `date_add`, `date_upd`) VALUES ('.(int)$this->id.', '.(int)$rule['id'].', NOW(), NOW())'); } return true; @@ -889,49 +968,22 @@ class HotelBranchInformation extends ObjectModel ); } - // Webservice :: get max order date of the hotel - public function getWsMaxOrderDate() - { - return Db::getInstance()->getValue( - 'SELECT `max_order_date` FROM `'._DB_PREFIX_.'htl_order_restrict_date` WHERE `id_hotel` = '.(int)$this->id.' ORDER BY `id` ASC' - ); - } - - // Webservice :: set max order date of the hotel - public function setWsMaxOrderDate($maxOrderDate) - { - if ($this->id) { - // delete previous - Db::getInstance()->execute(' - DELETE FROM `'._DB_PREFIX_.'htl_order_restrict_date` - WHERE `id_hotel` = '.(int)$this->id - ); - - // set max_order_date for the hotel from request - return Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'htl_order_restrict_date` (`id_hotel`, `max_order_date`) VALUES ('.(int)$this->id.', \''.pSQL($maxOrderDate).'\')'); - } - } - // Webservice :: function will run when hotel added from API public function addWs($autodate = true, $null_values = false) { if ($this->add($autodate, $null_values)) { + // Set hotel address + $this->setWsHotelAddress(); + + // set hotel restrictions + $this->setWsHotelRestrictions(); + // set categories of the hotel $this->setWsHotelCategories(); - $postData = trim(file_get_contents('php://input')); - libxml_use_internal_errors(true); - $xml = simplexml_load_string(utf8_decode($postData)); - - $hotelData = json_decode(json_encode($xml)); - if (isset($hotelData->hotel->max_order_date)) { - if ($maxOrderDate = $hotelData->hotel->max_order_date) { - $this->setWsMaxOrderDate($maxOrderDate); - } - } - return true; } + return false; } @@ -939,23 +991,259 @@ class HotelBranchInformation extends ObjectModel public function updateWs($null_values = false) { if ($this->update($null_values)) { + // Set hotel address + $this->setWsHotelAddress(); + + // set hotel restrictions + $this->setWsHotelRestrictions(); + // set categories of the hotel $this->setWsHotelCategories(); - $postData = trim(file_get_contents('php://input')); - libxml_use_internal_errors(true); - $xml = simplexml_load_string(utf8_decode($postData)); + return true; + } - $hotelData = json_decode(json_encode($xml)); - if (isset($hotelData->hotel->max_order_date)) { - if ($maxOrderDate = $hotelData->hotel->max_order_date) { - $this->setWsMaxOrderDate($maxOrderDate); + return false; + } + + public function setWsHotelAddress() + { + if ($idHotelAddress = $this->getHotelIdAddress()) { + $objAddress = new Address($idHotelAddress); + } else { + $objAddress = new Address(); + } + + $hotelName = $this->hotel_name[Configuration::get('PS_LANG_DEFAULT')]; + $hotelName = preg_replace('/[0-9!<>,;"?=+()@#°{}_$%:]*/u', '', $hotelName); + + $objAddress->id_hotel = $this->id; + $objAddress->id_country = $this->id_country; + $objAddress->id_state = $this->id_state; + $objAddress->city = $this->city; + $objAddress->postcode = $this->zipcode; + $objAddress->lastname = $hotelName; + $objAddress->firstname = $hotelName; + $objAddress->alias = $hotelName; + $objAddress->address1 = $this->address; + $objAddress->phone = $this->phone; + + return $objAddress->save(); + } + + public function setWsHotelRestrictions() + { + if ($this->id) { + // save maximum booking date and preparation time + if ($restrictDateInfo = HotelOrderRestrictDate::getDataByHotelId($this->id)) { + $objHotelRestrictDate = new HotelOrderRestrictDate($restrictDateInfo['id']); + } else { + $objHotelRestrictDate = new HotelOrderRestrictDate(); + } + + $objHotelRestrictDate->id_hotel = $this->id; + $objHotelRestrictDate->use_global_max_order_date = $this->use_global_max_order_date; + if (!$this->use_global_max_order_date) { + $objHotelRestrictDate->max_order_date = $this->max_order_date; + } + $objHotelRestrictDate->use_global_preparation_time = $this->use_global_preparation_time; + if (!$this->use_global_preparation_time) { + $objHotelRestrictDate->preparation_time = $this->preparation_time; + } + + return $objHotelRestrictDate->save(); + } + } + + public function validateFields($die = true, $error_return = false) + { + // set additional hotel address and restriction fields validations here + if (isset($this->webservice_validation) && $this->webservice_validation) { + if ($this->rating < 1 || $this->rating > 5) { + $message = Tools::displayError('Rating must be between 1 and 5.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + + if (!strtotime($this->check_in)) { + $message = Tools::displayError('Check In time is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + if (!strtotime($this->check_out)) { + $message = Tools::displayError('Check out time is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + + if ($this->check_in && $this->check_out && strtotime($this->check_out) >= strtotime($this->check_in)) { + $message = Tools::displayError('Check Out time must be before Check In time.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + if (!$this->phone) { + $message = Tools::displayError('Phone number is required field.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif (!Validate::isPhoneNumber($this->phone)) { + $message = Tools::displayError('Please enter a valid phone number.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + if ($this->address == '') { + $message = Tools::displayError('Address is required field.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif (!Validate::isAddress($this->address)) { + $message = Tools::displayError('Address is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + + if (!$this->id_country) { + $message = Tools::displayError('Country is required field.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } else { + if (Validate::isLoadedObject($objCountry = new Country($this->id_country))) { + $statesbycountry = State::getStatesByIdCountry($this->id_country); + /*If selected country has states only the validate state field*/ + if ($this->id_state) { + $objState = new State($this->id_state); + if ($objState->id_country != $this->id_country) { + $message = Tools::displayError('State is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + } else { + if ($statesbycountry) { + $message = Tools::displayError('State is required field.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + } + /* Check zip code format */ + if (empty($this->zipcode) && $objCountry->need_zip_code) { + $message = Tools::displayError('A Zip / Postal code is required.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif ($objCountry->zip_code_format && !$objCountry->checkZipCode($this->zipcode)) { + $message = sprintf(Tools::displayError('The Zip/Postal code you have entered is invalid. It must follow this format: %s'), str_replace('C', $objCountry->iso_code, str_replace('N', '0', str_replace('L', 'A', $objCountry->zip_code_format)))); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif ($this->zipcode && !Validate::isPostCode($this->zipcode)) { + $message = Tools::displayError('The Zip / Postal code is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + } else { + $message = Tools::displayError('country is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; } } - return true; + if ($this->city == '') { + $message = Tools::displayError('City is required field.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif (!Validate::isCityName($this->city)) { + $message = Tools::displayError('Enter a Valid City Name.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + + if (!Validate::isBool($this->use_global_max_order_date)) { + $message = Tools::displayError('invalid value for use_global_max_order_date.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + + if (!Validate::isBool($this->use_global_preparation_time)) { + $message = Tools::displayError('invalid value for use_global_preparation_time.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + + if (!$this->use_global_max_order_date) { + $maxOrderDateFormatted = date('Y-m-d', strtotime($this->max_order_date)); + if ($this->max_order_date == '') { + $message = Tools::displayError('Maximum date to book a room is required.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif (!Validate::isDate($this->max_order_date)) { + $message = Tools::displayError('Maximum date to book a room is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif (strtotime($maxOrderDateFormatted) < strtotime(date('Y-m-d'))) { + $message = Tools::displayError('Maximum Global Date to book a room can not be a past date. Please use a future date.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + } + + if (!$this->use_global_preparation_time) { + if ($this->preparation_time === '') { + $message = Tools::displayError('Preparation time is a required.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } elseif ($this->preparation_time !== '0' && !Validate::isUnsignedInt($this->preparation_time)) { + $message = Tools::displayError('Preparation time is invalid.'); + if ($die) { + throw new PrestaShopException($message); + } + return $error_return ? $message : false; + } + } } - return false; + + return parent::validateFields($die, $error_return); } // Webservice :: function will run when hotel deleted from API @@ -983,18 +1271,19 @@ class HotelBranchInformation extends ObjectModel } } $objCountry = new Country(); - $countryName = $objCountry->getNameById($idLang, $this->country_id); + $countryName = $objCountry->getNameById($idLang, $this->id_country); if ($catCountry = $this->addCategory($countryName, false, $groupIds)) { - if ($this->state_id) { + if ($this->id_state) { $objState = new State(); - $stateName = $objState->getNameById($this->state_id); + $stateName = $objState->getNameById($this->id_state); + $catState = $this->addCategory($stateName, $catCountry, $groupIds); } else { $catState = $this->addCategory($this->city, $catCountry, $groupIds); } if ($catState) { if ($catCity = $this->addCategory($this->city, $catState, $groupIds)) { - $hotelCatName = $this->hotel_name; + $hotelCatName = $this->hotel_name[Configuration::get('PS_LANG_DEFAULT')]; if ($catHotel = $this->addCategory( $hotelCatName, $catCity, $groupIds, 1, $this->id )) { @@ -1027,4 +1316,24 @@ class HotelBranchInformation extends ObjectModel return false; } + + public function searchByName($query, $idEmployeeProfile, $idLang = false) + { + if (!$idLang) { + $idLang = Context::getContext()->language->id; + } + + $sql = 'SELECT a.`id`, a.`active`, hbl.`hotel_name`, aa.`city`, s.`name` AS `state_name`, cl.`name` AS `country_name` + FROM `'._DB_PREFIX_.'htl_branch_info` a + LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbl ON hbl.`id` = a.`id` AND hbl.`id_lang` = '.(int)$idLang.' + LEFT JOIN `'._DB_PREFIX_.'address` aa ON aa.`id_hotel` = a.`id` + LEFT JOIN `'._DB_PREFIX_.'state` s ON s.`id_state` = aa.`id_state` + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON cl.`id_country` = aa.`id_country` AND cl.`id_lang` = hbl.`id_lang` + LEFT JOIN `'._DB_PREFIX_.'htl_access` ha ON a.`id` = ha.`id_hotel` + WHERE hbl.`hotel_name` LIKE \'%'.pSQL($query).'%\' + AND ha.`access`= 1 AND ha.`id_profile` = '.(int) $idEmployeeProfile; + + return Db::getInstance()->executeS($sql); + } + } diff --git a/modules/hotelreservationsystem/classes/HotelCartBookingData.php b/modules/hotelreservationsystem/classes/HotelCartBookingData.php index afae39dcb..dc32346d2 100644 --- a/modules/hotelreservationsystem/classes/HotelCartBookingData.php +++ b/modules/hotelreservationsystem/classes/HotelCartBookingData.php @@ -445,7 +445,9 @@ class HotelCartBookingData extends ObjectModel $serviceProducts, $roomsAvailableList, $id_cart, - $id_room = 0 + $id_room = 0, + $booking_type = HotelBookingDetail::ALLOTMENT_AUTO, + $comment = '' ) { $chkQty = 0; $num_days = HotelHelper::getNumberOfDays($date_from, $date_to); @@ -475,19 +477,21 @@ class HotelCartBookingData extends ObjectModel $obj_htl_cart_booking_data->id_product = $id_product; $obj_htl_cart_booking_data->id_room = $hotelRoomInfo['id_room']; $obj_htl_cart_booking_data->id_hotel = $id_hotel; - $obj_htl_cart_booking_data->booking_type = 1; $obj_htl_cart_booking_data->quantity = $num_days; $obj_htl_cart_booking_data->extra_demands = $roomDemand; $obj_htl_cart_booking_data->date_from = $date_from; $obj_htl_cart_booking_data->date_to = $date_to; + $obj_htl_cart_booking_data->booking_type = $booking_type; + $obj_htl_cart_booking_data->comment = $comment; if ($PS_ROOM_UNIT_SELECTION_TYPE == HotelBookingDetail::PS_ROOM_UNIT_SELECTION_TYPE_OCCUPANCY) { $room_occupancy = array_shift($occupancy); $obj_htl_cart_booking_data->adults = $room_occupancy['adults']; $obj_htl_cart_booking_data->children = $room_occupancy['children']; $obj_htl_cart_booking_data->child_ages = $room_occupancy['children'] ? json_encode($room_occupancy['child_ages']) : json_encode(array()); } else { + // if room is being booked without occupancy selection the for adults set base occupancy and children will be 0 $obj_htl_cart_booking_data->adults = $roomTypeInfo['adults']; - $obj_htl_cart_booking_data->children = $roomTypeInfo['children']; + $obj_htl_cart_booking_data->children = 0; $obj_htl_cart_booking_data->child_ages = json_encode(array()); } if ($res &= $obj_htl_cart_booking_data->save()) { @@ -542,7 +546,9 @@ class HotelCartBookingData extends ObjectModel $roomDemand = array(), $serviceProducts = array(), $id_cart = 0, - $id_guest = 0 + $id_guest = 0, + $booking_type = HotelBookingDetail::ALLOTMENT_AUTO, + $comment = '' ) { $context = Context::getContext(); if (!$id_cart) { @@ -622,7 +628,9 @@ class HotelCartBookingData extends ObjectModel $serviceProducts, $roomsAvailableList, $id_cart, - $id_room + $id_room, + $booking_type, + $comment ); } else { return false; @@ -766,6 +774,34 @@ class HotelCartBookingData extends ObjectModel return false; } + /** + * [removeBackdateRoomsFromCart :: To delete the rooms from cart whose booking date is before the current date + * + * @param [int] $idCart [Id of the cart] + * + * @return [boolean] [If removed successfully returns true else returns false] + */ + public function removeBackdateRoomsFromCart($idCart) + { + if ($cartBookingData = $this->getCartCurrentDataByCartId($idCart)) { + $res = true; + foreach ($cartBookingData as $cartRoom) { + if (strtotime($cartRoom['date_from']) < strtotime(date('Y-m-d'))) { + $res = $res && $this->deleteRoomDataFromOrderLine( + $cartRoom['id_cart'], + $cartRoom['id_guest'], + $cartRoom['id_product'], + $cartRoom['date_from'], + $cartRoom['date_to'] + ); + } + } + return $res; + } + + return true; + } + /** * [getCustomerIdRoomsByIdCartIdProduct :: To get array of rooms ids in the cart booked by a customer for a date range]. * @@ -889,6 +925,135 @@ class HotelCartBookingData extends ObjectModel return true; } + public static function validateCartBookings() + { + $context = Context::getContext(); + + $errors = array(); + + // validate room types if bookable from front office + if ($cartProducts = $context->cart->getProducts()) { + $objHotelCartBookingData = new HotelCartBookingData(); + foreach ($cartProducts as $product) { + if ($product['booking_product'] && !$product['show_at_front']) { + $objHotelCartBookingData->deleteCartBookingData($context->cart->id, $product['id_product']); + } + } + } + + // validate service products + if ($cartProducts = $context->cart->getProducts()) { + $objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail(); + foreach ($cartProducts as $product) { + if (!$product['active'] && !$product['booking_product']) { + $serviceProducts = $objRoomTypeServiceProductCartDetail->getServiceProductsInCart($context->cart->id, $product['id_product']); + foreach ($serviceProducts as $serviceProduct) { + $objRoomTypeServiceProductCartDetail->removeServiceProductByIdHtlCartBooking($serviceProduct['htl_cart_booking_id']); + } + } + } + } + + // validate room types for restriction date + $objModule = Module::getInstanceByName('hotelreservationsystem'); + if ($cartProducts = $context->cart->getProducts()) { + $objHotelCartBookingData = new HotelCartBookingData(); + $objHotelBookingDetail = new HotelBookingDetail(); + + foreach ($cartProducts as $product) { + if ($product['active']) { + if ($cartBookingData = $objHotelCartBookingData->getOnlyCartBookingData( + $context->cart->id, + $context->cart->id_guest, + $product['id_product'] + )) { + $cartData = array(); + foreach ($cartBookingData as $bookingData) { + $dateJoin = strtotime($bookingData['date_from']).strtotime($bookingData['date_to']); + $cartData[$dateJoin]['date_from'] = $bookingData['date_from']; + $cartData[$dateJoin]['date_to'] = $bookingData['date_to']; + $cartData[$dateJoin]['id_hotel'] = $bookingData['id_hotel']; + $cartData[$dateJoin]['id_rms'][] = $bookingData['id_room']; + } + + foreach ($cartData as $roomData) { + if ($maxOrderDate = HotelOrderRestrictDate::getMaxOrderDate($roomData['id_hotel'])) { + if (strtotime('-1 day', strtotime($maxOrderDate)) < strtotime($roomData['date_from']) + || strtotime($maxOrderDate) < strtotime($roomData['date_to']) + ) { + $objHotelBranchInformation = new HotelBranchInformation( + $roomData['id_hotel'], + $context->language->id + ); + $errors[] = sprintf( + 'You can not book rooms for hotel \'%s\' after date %s. Please remove rooms from %s - %s to proceed.', + $objHotelBranchInformation->hotel_name, + Tools::displayDate($maxOrderDate), + Tools::displayDate($roomData['date_from']), + Tools::displayDate($roomData['date_to']) + ); + $error = true; + } + } + + $preparationTime = HotelOrderRestrictDate::getPreparationTime($roomData['id_hotel']); + if ($preparationTime !== false) { + $minOrderDate = date('Y-m-d', strtotime('+'. ($preparationTime) .' days')); + if (strtotime($minOrderDate) > strtotime($roomData['date_from']) + || strtotime($minOrderDate . ' +1 day')> strtotime($roomData['date_to']) + ) { + $objHotelBranchInformation = new HotelBranchInformation( + $roomData['id_hotel'], + $context->language->id + ); + $errors[] = sprintf( + 'You can not book rooms for hotel \'%s\' before date %s. Please remove rooms from %s - %s to proceed.', + $objHotelBranchInformation->hotel_name, + Tools::displayDate($minOrderDate), + Tools::displayDate($roomData['date_from']), + Tools::displayDate($roomData['date_to']) + ); + $error = true; + } + } + + $bookingParams = array( + 'date_from' => $roomData['date_from'], + 'date_to' => $roomData['date_to'], + 'hotel_id' => $roomData['id_hotel'], + 'id_room_type' => $product['id_product'], + 'only_search_data' => 1, + ); + $bookingSearchData = $objHotelBookingDetail->dataForFrontSearch($bookingParams); + $isRmBooked = 0; + if (count($bookingSearchData['rm_data'][$product['id_product']]['data']['available']) < count($roomData['id_rms'])) { + foreach ($roomData['id_rms'] as $searchRoomData) { + if($isRmBooked = $objHotelBookingDetail->chechRoomBooked($searchRoomData, $roomData['date_from'], $roomData['date_to'])){ + break; + } + } + if ($isRmBooked) { + $errors[] = sprintf($objModule->l('The Room \'%s\' has been booked by another customer from \'%s\' to \'%s\' Please remove rooms from cart to proceed', 'HotelOrderRestrictDate'), $product['name'], date('d-m-Y', strtotime($roomData['date_from'])), date('d-m-Y', strtotime($roomData['date_to']))); + $error = true; + } else { + $errors[] = sprintf($objModule->l('The Room \'%s\' is no longer avalable from \'%s\' to \'%s\' Please remove rooms from cart to proceed', 'HotelOrderRestrictDate'), $product['name'], date('d-m-Y', strtotime($roomData['date_from'])), date('d-m-Y', strtotime($roomData['date_to']))); + $error = true; + } + } + } + } + } else { + $error = true; + $errors[] = $objModule->l('You can not book rooms from "', 'HotelOrderRestrictDate'). $product['name'] .$objModule->l('". Please remove rooms from "', 'HotelOrderRestrictDate'). $product['name'] . $objModule->l('" from cart to proceed.', 'HotelOrderRestrictDate'); + } + } + } + + $context->controller->errors = array_merge($context->controller->errors, $errors); + + return $errors; + } + /** * [getCartFormatedBookinInfoByIdCart : To get cart booking information with some additional information in a custom famated way]. * @param [Int] $id_cart [Id of the cart] @@ -976,7 +1141,14 @@ class HotelCartBookingData extends ObjectModel false ); - $cart_detail_data[$key]['additional_service'] = $objRoomTypeServiceProduct->getServiceProductsData($value['id_product']); + $cart_detail_data[$key]['additional_service'] = $objRoomTypeServiceProduct->getServiceProductsData( + $value['id_product'], + 1, + 0, + false, + 2, + null + ); $cart_detail_data[$key]['selected_services'] = $objRoomTypeServiceProductCartDetail->getRoomServiceProducts( $value['id'], 0, @@ -1004,6 +1176,32 @@ class HotelCartBookingData extends ObjectModel false, 1 ); + $cart_detail_data[$key]['additional_services_auto_add_with_room_price'] = $objRoomTypeServiceProductCartDetail->getServiceProductsTotalInCart( + $id_cart, + 0, + 0, + $value['id_product'], + $value['date_from'], + $value['date_to'], + $value['id'], + false, + 1, + null, + Product::PRICE_ADDITION_TYPE_WITH_ROOM + ); + $cart_detail_data[$key]['additional_services_auto_add_independent_price'] = $objRoomTypeServiceProductCartDetail->getServiceProductsTotalInCart( + $id_cart, + 0, + 0, + $value['id_product'], + $value['date_from'], + $value['date_to'], + $value['id'], + false, + 1, + null, + Product::PRICE_ADDITION_TYPE_INDEPENDENT + ); // By webkul New way to calculate product prices with feature Prices $roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( $value['id_product'], @@ -1100,9 +1298,15 @@ class HotelCartBookingData extends ObjectModel * * @return [array/false] [returns all entries if data found else return false] */ - public function getCartInfoIdCartIdProduct($id_cart, $id_product) + public function getCartInfoIdCartIdProduct($id_cart, $id_product, $date_from = false, $date_to = false) { - return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_cart_booking_data` WHERE `id_cart`='.(int) $id_cart.' AND `id_product`='.(int) $id_product); + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'htl_cart_booking_data` + WHERE `id_cart`='.(int) $id_cart.' AND `id_product`='.(int) $id_product; + if ($date_from && $date_to) { + $sql .= ' AND `date_from` = \''.pSQL($date_from).'\' AND `date_to` = \''.pSQL($date_to).'\''; + } + return Db::getInstance()->executeS($sql); } /** @@ -1138,9 +1342,9 @@ class HotelCartBookingData extends ObjectModel foreach ($featurePricePriority as $priority) { if ($priority == 'specific_date') { if ($featurePrice = Db::getInstance()->getRow( - 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp - INNER JOIN `'._DB_PREFIX_.'htl_room_type_feature_pricing_group` fpg - ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.') + 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp'. + (Group::isFeatureActive() ? ' INNER JOIN `'._DB_PREFIX_.'htl_room_type_feature_pricing_group` fpg + ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.')' : '').' WHERE fp.`id_cart` = 0 AND fp.`id_product`='.(int) $id_product.' AND fp.`active`=1 AND fp.`date_selection_type` = '.(int) HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC.' AND fp.`date_from` = \''.pSQL($date).'\'' )) { @@ -1148,9 +1352,9 @@ class HotelCartBookingData extends ObjectModel } } elseif ($priority == 'special_day') { if ($featurePrice = Db::getInstance()->executeS( - 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp - INNER JOIN `'._DB_PREFIX_.'htl_room_type_feature_pricing_group` fpg - ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.') + 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp'. + (Group::isFeatureActive() ? ' INNER JOIN `'._DB_PREFIX_.'htl_room_type_feature_pricing_group` fpg + ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.')' : '').' WHERE fp.`id_cart` = 0 AND fp.`id_product`='.(int) $id_product.' AND fp.`is_special_days_exists`=1 AND fp.`active`=1 AND fp.`date_from` <= \''.pSQL($date).'\' AND fp.`date_to` >= \''.pSQL($date).'\'' @@ -1164,9 +1368,9 @@ class HotelCartBookingData extends ObjectModel } } elseif ($priority == 'date_range') { if ($featurePrice = Db::getInstance()->getRow( - 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp - INNER JOIN `'._DB_PREFIX_.'htl_room_type_feature_pricing_group` fpg - ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.') + 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp'. + (Group::isFeatureActive() ? ' INNER JOIN `'._DB_PREFIX_.'htl_room_type_feature_pricing_group` fpg + ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.')' : '').' WHERE fp.`id_cart` = 0 AND fp.`id_product`='.(int) $id_product.' AND fp.`date_selection_type` = '.(int) HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE.' AND `is_special_days_exists`=0 AND `active`=1 AND fp.`date_from` <= \''.pSQL($date).'\' AND fp.`date_to` >= \''.pSQL($date).'\'' @@ -1228,6 +1432,7 @@ class HotelCartBookingData extends ObjectModel $cartHotelData[$prodKey]['name'] = $objProduct->name; $cartHotelData[$prodKey]['unit_price'] = $unitPrice; $cartHotelData[$prodKey]['unit_price_without_reduction'] = $unitPriceWithoutReduction; + $cartHotelData[$prodKey]['total_room_type_amount'] = 0; // get cover image link $coverImageArr = $objProduct->getCover($product['id_product']); @@ -1333,7 +1538,12 @@ class HotelCartBookingData extends ObjectModel $roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( $product['id_product'], $data_v['date_from'], - $data_v['date_to'] + $data_v['date_to'], + 0, + 0, + $context->cart->id, + $context->cart->id_guest, + $data_v['id_room'] ); $roomTypeDateRangePriceWithoutAutoAdd = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( $product['id_product'], @@ -1341,9 +1551,9 @@ class HotelCartBookingData extends ObjectModel $data_v['date_to'], 0, 0, - 0, - 0, - 0, + $context->cart->id, + $context->cart->id_guest, + $data_v['id_room'], 0 ); if (!$price_tax) { @@ -1375,7 +1585,12 @@ class HotelCartBookingData extends ObjectModel $roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( $product['id_product'], $data_v['date_from'], - $data_v['date_to'] + $data_v['date_to'], + 0, + 0, + $context->cart->id, + $context->cart->id_guest, + $data_v['id_room'] ); $roomTypeDateRangePriceWithoutAutoAdd = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( $product['id_product'], @@ -1383,9 +1598,9 @@ class HotelCartBookingData extends ObjectModel $data_v['date_to'], 0, 0, - 0, - 0, - 0, + $context->cart->id, + $context->cart->id_guest, + $data_v['id_room'], 0 ); if (!$price_tax) { @@ -1425,6 +1640,7 @@ class HotelCartBookingData extends ObjectModel $cartHotelData[$prodKey]['date_diff'][$dateJoin]['feature_price_diff'] = $feature_price_diff; } + $cartHotelData[$prodKey]['total_room_type_amount'] = array_sum(array_column($cartHotelData[$prodKey]['date_diff'], 'amount')); $cartHotelData[$prodKey]['total_num_rooms'] = array_sum(array_column($cartHotelData[$prodKey]['date_diff'], 'num_rm')); } } diff --git a/modules/hotelreservationsystem/classes/HotelFeatures.php b/modules/hotelreservationsystem/classes/HotelFeatures.php index 13d53b76a..120eb6b6a 100644 --- a/modules/hotelreservationsystem/classes/HotelFeatures.php +++ b/modules/hotelreservationsystem/classes/HotelFeatures.php @@ -207,4 +207,19 @@ class HotelFeatures extends ObjectModel { return Db::getInstance()->update('htl_features', $update_params, 'id='.(int) $parent_feature_id); } + + public function searchByName($query, $idLang = false) + { + if (!$idLang) { + $idLang = Context::getContext()->language->id; + } + + return Db::getInstance()->executeS( + 'SELECT hf.*, hfl.* FROM `'._DB_PREFIX_.'htl_features` hf + LEFT JOIN `'._DB_PREFIX_.'htl_features_lang` hfl + ON hfl.`id` = hf.`id` + WHERE hfl.`name` LIKE \'%'.pSQL($query).'%\' + AND hfl.`id_lang`='.(int) $idLang + ); + } } diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index 447e95354..8aee39b6f 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -208,6 +208,8 @@ class HotelHelper ); Configuration::updateValue('WK_HOTEL_GLOBAL_CONTACT_NUMBER', '0987654321'); Configuration::updateValue('WK_HOTEL_GLOBAL_CONTACT_EMAIL', 'hotelprime@htl.com'); + Configuration::updateValue('WK_CUSTOMER_SUPPORT_PHONE_NUMBER', '0987654321'); + Configuration::updateValue('WK_CUSTOMER_SUPPORT_EMAIL', 'hotelprime@htl.com'); Configuration::updateValue('WK_TITLE_HEADER_BLOCK', $home_banner_default_title); Configuration::updateValue('WK_CONTENT_HEADER_BLOCK', $home_banner_default_content); @@ -305,15 +307,16 @@ class HotelHelper return true; } - public static function getPsProducts($id_lang, $start = 0, $limit = 0) + public static function getPsProducts($id_lang, $start = 0, $limit = 0, $booking_product = null) { - $sql = 'SELECT p.`id_product`, pl.`name` + $sql = 'SELECT p.`id_product`, pl.`name`, p.`booking_product` FROM `'._DB_PREFIX_.'product` p '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` '. Shop::addSqlRestrictionOnLang('pl').') WHERE pl.`id_lang` = '.(int)$id_lang. - ' ORDER BY pl.`name`'. + (isset($booking_product) ? ' AND p.`booking_product` = '.(int) $booking_product : '').' + ORDER BY pl.`name`'. ($limit > 0 ? ' LIMIT '.(int)$start.','.(int)$limit : ''); return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); } @@ -357,7 +360,7 @@ class HotelHelper $objAddress->city = 'Demo City'; $objAddress->id_state = $state_id; $objAddress->id_country = $def_cont_id; - $objAddress->postcode = self::getRandomZipcodeByForCountry($def_cont_id); + $objAddress->postcode = Tools::generateRandomZipcode($def_cont_id); $objAddress->address1 = 'Monticello Dr, Montgomery, AL 36117, USA'; $objAddress->alias = 'The Hotel Prime'; $objAddress->lastname = 'The Hotel Prime'; @@ -434,7 +437,7 @@ class HotelHelper $product->description_short[$lang['id_lang']] = 'Fashion axe kogi yuccie, ramps shabby chic direct trade before they sold out distillery bicycle rights. Slow-carb +1 quinoa VHS. +1 brunch trust fund, meggings chartreuse sustainable everyday carry tumblr hoodie tacos tilde ramps post-ironic fixie.'; - $product->link_rewrite[$lang['id_lang']] = Tools::link_rewrite('Super Delux Rooms'); + $product->link_rewrite[$lang['id_lang']] = Tools::link_rewrite($value_prod); } $product->id_shop_default = Context::getContext()->shop->id; $product->id_category_default = 2; @@ -442,6 +445,7 @@ class HotelHelper $product->active = 1; $product->quantity = 999999999; $product->booking_product = true; + $product->show_at_front = 1; $product->is_virtual = 1; $product->indexed = 1; $product->save(); @@ -515,7 +519,7 @@ class HotelHelper $htl_room_info_obj = new HotelRoomInformation(); $htl_room_info_obj->id_product = $product_id; $htl_room_info_obj->id_hotel = $id_hotel; - $htl_room_info_obj->room_num = 'A-10'.$k; + $htl_room_info_obj->room_num = $value_prod[0].'R-10'.$k; $htl_room_info_obj->id_status = 1; $htl_room_info_obj->floor = 'First'; $htl_room_info_obj->save(); @@ -544,6 +548,186 @@ class HotelHelper } } + public function saveDummyServiceProductsAndRelatedInfo() + { + $idCategoryServices = (int) Configuration::get('PS_SERVICE_CATEGORY'); + $idsGroup = array_column(Group::getGroups(Context::getContext()->language->id), 'id_group'); + + // create service categories + $categories = array( + 'restaurant' => array( + 'name' => 'Restaurant', + 'id_category' => 'to_be_set_below', + ), + 'transfers' => array( + 'name' => 'Transfers', + 'id_category' => 'to_be_set_below', + ), + 'activities' => array( + 'name' => 'Activities', + 'id_category' => 'to_be_set_below', + ), + 'charges' => array( + 'name' => 'Operational charges', + 'id_category' => 'to_be_set_below', + ), + ); + + foreach ($categories as &$category) { + $idCategory = $this->addCategory($category['name'], $idCategoryServices, $idsGroup); + $category['id_category'] = $idCategory; + } + + // create service products + $serviceProducts = array( + array( + 'name' => 'Room Maintenance Fees', + 'id_category_default' => $categories['charges']['id_category'], + 'description' => 'Ensure a comfortable stay with our room maintenance service, keeping your accommodation pristine and hassle-free throughout your visit.', + 'price' => '250', + 'auto_add_to_cart' => 1, + 'show_at_front' => 0, + 'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_DAY, + 'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM, + ), + array( + 'name' => 'Internet Handling Charges', + 'id_category_default' => $categories['charges']['id_category'], + 'description' => 'Navigate our website effortlessly with seamless handling, ensuring reliable, high-speed access for an enjoyable browsing experience throughout your online journey.', + 'price' => '250', + 'auto_add_to_cart' => 1, + 'show_at_front' => 0, + 'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_BOOKING, + 'price_addition_type' => Product::PRICE_ADDITION_TYPE_INDEPENDENT, + ), + array( + 'name' => 'Airport Shuttle', + 'id_category_default' => $categories['transfers']['id_category'], + 'description' => 'Experience convenience from touchdown to check-in with our efficient airport shuttle service, whisking you to your accommodation with ease and comfort.', + 'price' => '50', + 'auto_add_to_cart' => 0, + 'show_at_front' => 1, + 'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_BOOKING, + 'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM, + ), + array( + 'name' => 'Cab on Demand', + 'id_category_default' => $categories['transfers']['id_category'], + 'description' => 'Explore the city conveniently with our cab-on-demand service, giving you the freedom to travel and discover local attractions at your own pace.', + 'price' => '200', + 'auto_add_to_cart' => 0, + 'show_at_front' => 1, + 'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_BOOKING, + 'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM, + ), + array( + 'name' => 'Breakfast', + 'id_category_default' => $categories['restaurant']['id_category'], + 'description' => 'Start your day right with a delicious and hearty breakfast, thoughtfully prepared to fuel your adventures and make your mornings exceptional.', + 'price' => '350', + 'auto_add_to_cart' => 0, + 'show_at_front' => 1, + 'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_DAY, + 'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM, + ), + array( + 'name' => 'Dinner', + 'id_category_default' => $categories['restaurant']['id_category'], + 'description' => 'Wind down in the evening with a delectable dinner spread, offering a culinary journey that delights your taste buds and completes your day with satisfaction.', + 'price' => '450', + 'auto_add_to_cart' => 0, + 'show_at_front' => 1, + 'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_DAY, + 'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM, + ), + ); + + foreach ($serviceProducts as $serviceProduct) { + $objProduct = new Product(); + $objProduct->name = array(); + $objProduct->description = array(); + $objProduct->description_short = array(); + $objProduct->link_rewrite = array(); + + // copy lang values + foreach (Language::getLanguages(true) as $language) { + $objProduct->name[$language['id_lang']] = $serviceProduct['name']; + $objProduct->description[$language['id_lang']] = $serviceProduct['description']; + $objProduct->description_short[$language['id_lang']] = $serviceProduct['description']; + $objProduct->link_rewrite[$language['id_lang']] = Tools::link_rewrite($serviceProduct['name']); + } + + $objProduct->id_shop_default = Context::getContext()->shop->id; + $objProduct->id_category_default = $serviceProduct['id_category_default']; + $objProduct->price = $serviceProduct['price']; + $objProduct->active = 1; + $objProduct->quantity = 999999999; + $objProduct->booking_product = 0; + $objProduct->service_product_type = Product::SERVICE_PRODUCT_WITH_ROOMTYPE; + $objProduct->auto_add_to_cart = $serviceProduct['auto_add_to_cart']; + $objProduct->show_at_front = $serviceProduct['show_at_front']; + $objProduct->available_for_order = 1; + $objProduct->price_addition_type = $serviceProduct['price_addition_type']; + $objProduct->price_calculation_method = $serviceProduct['price_calculation_method']; + $objProduct->is_virtual = 1; + $objProduct->indexed = 1; + $objProduct->save(); + $idProduct = $objProduct->id; + + // add to applicable categories + $objCategory = new Category($serviceProduct['id_category_default']); + if ($categories = $objCategory->getParentsCategories()) { + $idsCategory = array(); + foreach ($categories as $category) { + $idsCategory[] = $category['id_category']; + } + $objProduct->addToCategories($idsCategory); + } + + Search::indexation(Tools::link_rewrite($serviceProduct['name']), $idProduct); + + StockAvailable::updateQuantity($idProduct, null, 999999999); + + // save service product images + $imagesBasePath = _PS_MODULE_DIR_.'hotelreservationsystem/views/img/prod_imgs/'.$idProduct.'/'; + $imagesTypes = ImageType::getImagesTypes('products'); + if (is_dir($imagesBasePath) && $opendir = opendir($imagesBasePath)) { + while (($image = readdir($opendir)) !== false) { + $sourceImagePath = $imagesBasePath.$image; + + if (ImageManager::isRealImage($sourceImagePath) + && ImageManager::isCorrectImageFileExt($sourceImagePath) + ) { + $objImage = new Image(); + $objImage->id_product = $idProduct; + $objImage->position = Image::getHighestPosition($idProduct) + 1; + $objImage->cover = 1; + $objImage->add(); + $destinationPath = $objImage->getPathForCreation(); + foreach ($imagesTypes as $imageType) { + ImageManager::resize( + $sourceImagePath, + $destinationPath.'-'.$imageType['name'].'.jpg', + $imageType['width'], + $imageType['height'] + ); + } + ImageManager::resize($sourceImagePath, $destinationPath.'.jpg'); + } + } + closedir($opendir); + } + + // link to all demo room types + $objRoomTypeServiceProduct = new RoomTypeServiceProduct(); + $objRoomTypeServiceProduct->addRoomProductLink( + $idProduct, + array(1, 2, 3, 4), + RoomTypeServiceProduct::WK_ELEMENT_TYPE_ROOM_TYPE + ); + } + } + public function saveAdvancedPaymentInfo($id_product) { $obj_adv_pmt = new HotelAdvancedPayment(); @@ -584,6 +768,7 @@ class HotelHelper $this->saveDummyHotelImages($htl_id); $this->saveDummyHotelFeatures($htl_id); $this->saveDummyProductsAndRelatedInfo($htl_id); + $this->saveDummyServiceProductsAndRelatedInfo(); return true; } @@ -715,22 +900,7 @@ class HotelHelper public static function getRandomZipcodeByForCountry($idCountry) { - $randZipCode = ''; - $alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - if (Validate::isLoadedObject($objCountry = new Country($idCountry))) { - if ($objCountry->need_zip_code) { - if ($randZipCode = $objCountry->zip_code_format) { - $randZipCode = str_replace('N', mt_rand(0, 9), $randZipCode); - $randZipCode = str_replace('L', $alphabet[mt_rand(0, Tools::strlen($alphabet) - 1)], $randZipCode); - $randZipCode = str_replace('C', $objCountry->iso_code, $randZipCode); - } else { - for ($i = 0; $i < 5; ++$i) { - $randZipCode .= mt_rand(0, 9); - } - } - } - } - return $randZipCode; + return Tools::generateRandomZipcode($idCountry); } /** diff --git a/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php b/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php index 0cdc01615..32a6ad0e0 100644 --- a/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php +++ b/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php @@ -186,14 +186,6 @@ class HotelOrderRefundRules extends ObjectModel if ($refRule['payment_type'] == HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_PERCENTAGE) { $bookingCancellationDetail['reduction_type'] = HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_PERCENTAGE; $bookingCancellationDetail['cancelation_charge'] = $paidAmount * ($refundValue / 100); - - if ($defaultCurrency != $orderCurrency) { - $bookingCancellationDetail['cancelation_charge'] = Tools::convertPriceFull( - $bookingCancellationDetail['cancelation_charge'], - $objDefaultCurrency, - $objOrderCurrency - ); - } } else { $bookingCancellationDetail['reduction_type'] = HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_FIXED; if ($defaultCurrency != $orderCurrency) { @@ -275,4 +267,23 @@ class HotelOrderRefundRules extends ObjectModel return array(); } + + public function searchByName($query, $idLang = false) + { + if (!$idLang) { + $idLang = Context::getContext()->language->id; + } + + return Db::getInstance()->executeS( + 'SELECT horr.*, horrl.* FROM `'._DB_PREFIX_.'htl_order_refund_rules` horr + LEFT JOIN `'._DB_PREFIX_.'htl_order_refund_rules_lang` horrl + ON horrl.`id_refund_rule` = horr.`id_refund_rule` + WHERE ( + horrl.`name` LIKE \'%'.pSQL($query).'%\' OR + horrl.`description` LIKE \'%'.pSQL($query).'%\' + ) + AND horrl.`id_lang`='.(int) $idLang + ); + } + } diff --git a/modules/hotelreservationsystem/classes/HotelOrderRestrictDate.php b/modules/hotelreservationsystem/classes/HotelOrderRestrictDate.php index 785bc515f..d623d8bf6 100644 --- a/modules/hotelreservationsystem/classes/HotelOrderRestrictDate.php +++ b/modules/hotelreservationsystem/classes/HotelOrderRestrictDate.php @@ -86,100 +86,12 @@ class HotelOrderRestrictDate extends ObjectModel public static function validateOrderRestrictDateOnPayment(&$controller) { - $error = false; - $moduleInstance = Module::getInstanceByName('hotelreservationsystem'); - $context = Context::getContext(); - if ($cartProducts = $context->cart->getProducts()) { - foreach ($cartProducts as $product) { - if ($product['active']) { - $objCartBookingData = new HotelCartBookingData(); - $objBookingDetail = new HotelBookingDetail(); - $obj_rm_type = new HotelRoomType(); + if ($errors = HotelCartBookingData::validateCartBookings()) { + $controller->errors = array_merge($controller->errors, $errors); - if ($cart_bk_data = $objCartBookingData->getOnlyCartBookingData( - $context->cart->id, - $context->cart->id_guest, - $product['id_product'] - )) { - $cart_data = array(); - foreach ($cart_bk_data as $data) { - $date_join = strtotime($data['date_from']).strtotime($data['date_to']); - $cart_data[$date_join]['date_from'] = $data['date_from']; - $cart_data[$date_join]['date_to'] = $data['date_to']; - $cart_data[$date_join]['id_hotel'] = $data['id_hotel']; - $cart_data[$date_join]['id_rms'][] = $data['id_room']; - } - foreach ($cart_data as $cl_key => $cl_val) { - if ($maxOrderDate = HotelOrderRestrictDate::getMaxOrderDate($cl_val['id_hotel'])) { - if (strtotime('-1 day', strtotime($maxOrderDate)) < strtotime($cl_val['date_from']) - || strtotime($maxOrderDate) < strtotime($cl_val['date_to']) - ) { - $objBranchInfo = new HotelBranchInformation( - $cl_val['id_hotel'], - $context->language->id - ); - $controller->errors[] = sprintf( - 'You can not book rooms for hotel \'%s\' after date %s. Please remove rooms from %s - %s to proceed.', - $objBranchInfo->hotel_name, - Tools::displayDate($maxOrderDate), - Tools::displayDate($cl_val['date_from']), - Tools::displayDate($cl_val['date_to']) - ); - $error = true; - } - } - $preparationTime = HotelOrderRestrictDate::getPreparationTime($cl_val['id_hotel']); - if ($preparationTime !== false) { - $minOrderDate = date('Y-m-d', strtotime('+'. ($preparationTime) .' days')); - if (strtotime($minOrderDate) > strtotime($cl_val['date_from']) - || strtotime($minOrderDate . ' +1 day')> strtotime($cl_val['date_to']) - ) { - $objBranchInfo = new HotelBranchInformation( - $cl_val['id_hotel'], - $context->language->id - ); - $controller->errors[] = sprintf( - 'You can not book rooms for hotel \'%s\' before date %s. Please remove rooms from %s - %s to proceed.', - $objBranchInfo->hotel_name, - Tools::displayDate($minOrderDate), - Tools::displayDate($cl_val['date_from']), - Tools::displayDate($cl_val['date_to']) - ); - $error = true; - } - } - - $bookingParams = array( - 'date_from' => $cl_val['date_from'], - 'date_to' => $cl_val['date_to'], - 'hotel_id' => $cl_val['id_hotel'], - 'id_room_type' => $product['id_product'], - 'only_search_data' => 1, - ); - $avai_rm = $objBookingDetail->dataForFrontSearch($bookingParams); - $isRmBooked = 0; - if (count($avai_rm['rm_data'][$product['id_product']]['data']['available']) < count($cl_val['id_rms'])) { - foreach ($cl_val['id_rms'] as $cr_key => $cr_val) { - if($isRmBooked = $objBookingDetail->chechRoomBooked($cr_val, $cl_val['date_from'], $cl_val['date_to'])){ - break; - } - } - if ($isRmBooked) { - $controller->errors[] = sprintf($moduleInstance->l('The Room \'%s\' has been booked by another customer from \'%s\' to \'%s\' Please remove rooms from cart to proceed', 'HotelOrderRestrictDate'), $product['name'], date('d-m-Y', strtotime($cl_val['date_from'])), date('d-m-Y', strtotime($cl_val['date_to']))); - $error = true; - } else { - $controller->errors[] = sprintf($moduleInstance->l('The Room \'%s\' is no longer avalable from \'%s\' to \'%s\' Please remove rooms from cart to proceed', 'HotelOrderRestrictDate'), $product['name'], date('d-m-Y', strtotime($cl_val['date_from'])), date('d-m-Y', strtotime($cl_val['date_to']))); - $error = true; - } - } - } - } - } else { - $error = true; - $controller->errors[] = $moduleInstance->l('You can not book rooms from "', 'HotelOrderRestrictDate'). $product['name'] .$moduleInstance->l('". Please remove rooms from "', 'HotelOrderRestrictDate'). $product['name'] . $moduleInstance->l('" from cart to proceed.', 'HotelOrderRestrictDate'); - } - } + return true; } - return $error; + + return false; } } diff --git a/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php b/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php index 5e8a45c1e..484311892 100644 --- a/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php +++ b/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php @@ -482,7 +482,7 @@ class HotelReservationSystemDb ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;", "INSERT INTO `"._DB_PREFIX_."htl_settings_link_lang` (`id_settings_link`, `id_lang`, `name`, `hint`) - SELECT 1, `id_lang`, 'General Settings', 'Configure Your hotel general gettings using this option.' + SELECT 1, `id_lang`, 'General Settings', 'Configure Your hotel general settings using this option.' FROM `"._DB_PREFIX_."lang` ORDER BY `id_lang`;", diff --git a/modules/hotelreservationsystem/classes/HotelRoomDisableDates.php b/modules/hotelreservationsystem/classes/HotelRoomDisableDates.php index ca940629d..8890ef2e0 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomDisableDates.php +++ b/modules/hotelreservationsystem/classes/HotelRoomDisableDates.php @@ -50,7 +50,7 @@ class HotelRoomDisableDates extends ObjectModel public function checkIfRoomAlreadyDisabled($params) { - return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_room_disable_dates` WHERE `id_room` = '.(int)$params['id_room'].' AND `date_from` <= \''.pSQL($params['date_from']).'\' AND `date_to` >= \''.pSQL($params['date_to']).'\''); + return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_room_disable_dates` WHERE `id_room` = '.(int)$params['id_room'].' AND `date_from` < \''.pSQL($params['date_to']).'\' AND `date_to` > \''.pSQL($params['date_from']).'\''); } public function updateDisableDateRanges($params) @@ -118,4 +118,5 @@ class HotelRoomDisableDates extends ObjectModel return Db::getInstance()->delete('htl_room_disable_dates', '`id_room_type`='.(int)$idRoomType); } + } diff --git a/modules/hotelreservationsystem/classes/HotelRoomInformation.php b/modules/hotelreservationsystem/classes/HotelRoomInformation.php index 5407802f5..26ffbbb5d 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomInformation.php +++ b/modules/hotelreservationsystem/classes/HotelRoomInformation.php @@ -224,6 +224,27 @@ class HotelRoomInformation extends ObjectModel } } + public static function getHotelRoomsInfo($idHotel = null, $idProduct = null, $idLang = null) + { + if (!$idLang) { + $idLang = Context::getContext()->language->id; + } + + $sql = 'SELECT hri.*, hri.`id_product`, hri.`id_hotel`, hrt.`adults`, hrt.`children`, hrt.`max_adults`, + hrt.`max_children`, hrt.`max_guests`, hrt.`min_los`, hrt.`max_los`, pl.`name` AS room_type_name, hbil.`hotel_name` AS hotel_name + FROM `'._DB_PREFIX_.'htl_room_information` hri + INNER JOIN `'._DB_PREFIX_.'htl_room_type` hrt ON (hrt.`id_product` = hri.`id_product`) + INNER JOIN `'._DB_PREFIX_.'htl_branch_info` hbi ON (hbi.`id` = hri.`id_hotel`) + INNER JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbil ON (hbil.`id` = hri.`id_hotel` AND hbil.`id_lang` = '.(int) $idLang.') + INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = hri.`id_product`) + INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = '.(int) $idLang.') + WHERE 1 '.($idHotel ? ' AND hri.`id_hotel` = '.(int) $idHotel : ''). + ($idProduct ? ' AND hri.`id_product` = '.(int) $idProduct : '').' + ORDER BY hri.`id_product`, hri.`id`'; + + return Db::getInstance()->executeS($sql); + } + /** * Deprecated * [deleteHotelRoomInfoById :: To delete room information which id is passed] @@ -249,7 +270,12 @@ class HotelRoomInformation extends ObjectModel public function getRoomTypeBookedRoomsForDateRange($id_hotel, $id_product, $date_from, $date_to) { - return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_booking_detail` where `date_from`< \''.pSQL($date_to).'\' AND `date_to`>\''.$date_from.'\' AND `id_product`='.(int) $id_product.' AND `id_hotel`='.(int) $id_hotel); + return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'htl_booking_detail` where `date_from`< \''.pSQL($date_to).'\' AND `date_to`>\''.pSQL($date_from).'\' AND `id_product`='.(int) $id_product.' AND `id_hotel`='.(int) $id_hotel); + } + + public function getFutureBookings($idRoom) + { + return Db::getInstance()->executeS('SELECT `id`, `id_order`, `date_from`, `date_to` FROM `'._DB_PREFIX_.'htl_booking_detail` where `date_to` > \''.pSQL(date('Y-m-d')).'\' AND `is_refunded` = 0 AND `id_room`='.(int) $idRoom); } // Webservice :: webservice add function diff --git a/modules/hotelreservationsystem/classes/HotelRoomType.php b/modules/hotelreservationsystem/classes/HotelRoomType.php index bb6448a57..a5445ec18 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomType.php +++ b/modules/hotelreservationsystem/classes/HotelRoomType.php @@ -276,13 +276,21 @@ class HotelRoomType extends ObjectModel /** * @param [int] $roomTypesList: string of idRoomTypes seperated by "," */ - public function getRoomTypeDetailByRoomTypeIds($roomTypesList) + public function getRoomTypeDetailByRoomTypeIds($roomTypesList, $position = true) { - $sql = 'SELECT COUNT(hri.`id`) AS `numberOfRooms`, hrt.`id_product`, `adults`, `children`, `max_adults`, `max_children`, `max_guests` - FROM `'._DB_PREFIX_.'htl_room_type` AS `hrt` - INNER JOIN `'._DB_PREFIX_.'htl_room_information` AS `hri` ON (hri.`id_product` = hrt.`id_product`) - WHERE hrt.`id_product` IN ('.$roomTypesList.') - GROUP BY hrt.`id_product`'; + $sql = 'SELECT COUNT(hri.`id`) AS `numberOfRooms`, hrt.`id_product`, `adults`, `children`, `max_adults`, `max_children`, `max_guests`'. + ($position ? ', cp.`position`' : '').' + FROM `'._DB_PREFIX_.'htl_room_type` AS `hrt` + INNER JOIN `'._DB_PREFIX_.'htl_room_information` AS `hri` ON (hri.`id_product` = hrt.`id_product`)'; + + if ($position) { + $sql .= ' INNER JOIN `'._DB_PREFIX_.'htl_branch_info` hbi ON (hbi.`id` = hrt.`id_hotel`) + INNER JOIN `'._DB_PREFIX_.'category_product` cp ON cp.`id_category` = hbi.`id_category` AND cp.`id_product` = hrt.`id_product`'; + } + + $sql .= 'WHERE hrt.`id_product` IN ('.$roomTypesList.') + GROUP BY hrt.`id_product`'. + ($position ? ' ORDER BY cp.`position`' : ''); return Db::getInstance()->executeS($sql); } @@ -314,15 +322,19 @@ class HotelRoomType extends ObjectModel * * @return [array|false] [If data found returns array containing information of the room types else returns false ] */ - public function getIdProductByHotelId($idHotel, $idRoomType = 0, $onlyActiveProd = 0, $onlyActiveHotel = 0) + public function getIdProductByHotelId($idHotel, $idRoomType = 0, $onlyActiveProd = 0, $onlyActiveHotel = 0, $checkShowAtFront = null) { + if (is_null($checkShowAtFront)) { + $checkShowAtFront = isset(Context::getContext()->employee->id) ? 0 : 1; + } + $sql = 'SELECT DISTINCT hrt.`id_product`, hrt.`adults`, hrt.`children`, hrt.`id` FROM `'._DB_PREFIX_.'htl_room_type` AS hrt '; if ($onlyActiveHotel) { $sql .= 'INNER JOIN `'._DB_PREFIX_.'htl_branch_info` AS hti ON (hti.id = hrt.id_hotel AND hti.active = 1)'; } - if ($onlyActiveProd) { + if ($onlyActiveProd || $checkShowAtFront) { $sql .= 'INNER JOIN `'._DB_PREFIX_.'product` AS pp ON (hrt.id_product = pp.id_product AND pp.active = 1)'; } $sql .= 'WHERE hrt.`id_hotel`='. (int)$idHotel; @@ -330,6 +342,10 @@ class HotelRoomType extends ObjectModel if ($idRoomType) { $sql .= ' AND hrt.`id_product` = '. (int)$idRoomType; } + if ($checkShowAtFront) { + $sql .= ' AND pp.`show_at_front` = 1'; + } + return Db::getInstance()->executeS($sql); } diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php b/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php index ad8183581..e02bdf307 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php @@ -205,7 +205,8 @@ class HotelRoomTypeDemand extends ObjectModel $idCustomer = null, $idCart = null, $id_address = null, - Context $context = null + Context $context = null, + $customPrice = null ) { if (!$context) { $context = Context::getContext(); @@ -266,7 +267,8 @@ class HotelRoomTypeDemand extends ObjectModel $useTax, $decimals, $idCustomer, - $idCart + $idCart, + $customPrice ); } @@ -282,7 +284,8 @@ class HotelRoomTypeDemand extends ObjectModel $useTax, $decimals, $idCustomer = 0, - $idCart = 0 + $idCart = 0, + $customPrice = null ) { static $address = null; static $context = null; @@ -310,24 +313,28 @@ class HotelRoomTypeDemand extends ObjectModel // here get the price of global demand $objRoomDmdPrice = new HotelRoomTypeDemandPrice(); - if ($idOption) { - $objOption = new HotelRoomTypeGlobalDemandAdvanceOption($idOption); - $price = $objRoomDmdPrice->getRoomTypeDemandPrice( - $idProduct, - $idGlobalDemand, - $idOption - ); - if (!Validate::isPrice($price)) { - $price = $objOption->price; - } + if (!is_null($customPrice)) { + $price = $customPrice; } else { - $objGlobalDemand = new HotelRoomTypeGlobalDemand($idGlobalDemand); - $price = $objRoomDmdPrice->getRoomTypeDemandPrice( - $idProduct, - $idGlobalDemand - ); - if (!Validate::isPrice($price)) { - $price = $objGlobalDemand->price; + if ($idOption) { + $objOption = new HotelRoomTypeGlobalDemandAdvanceOption($idOption); + $price = $objRoomDmdPrice->getRoomTypeDemandPrice( + $idProduct, + $idGlobalDemand, + $idOption + ); + if (!Validate::isPrice($price)) { + $price = $objOption->price; + } + } else { + $objGlobalDemand = new HotelRoomTypeGlobalDemand($idGlobalDemand); + $price = $objRoomDmdPrice->getRoomTypeDemandPrice( + $idProduct, + $idGlobalDemand + ); + if (!Validate::isPrice($price)) { + $price = $objGlobalDemand->price; + } } } $price = Tools::convertPrice($price, $idCurrency); diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php index 29c85977e..f4be56fd3 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php @@ -189,13 +189,13 @@ class HotelRoomTypeFeaturePricing extends ObjectModel if ($type == 'specific_date') { return Db::getInstance()->getRow( 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` - WHERE `id_product`='.(int) $id_product.' + WHERE `id_product`='.(int) $id_product.' AND `active`=1 AND `date_selection_type` = '.(int) self::DATE_SELECTION_TYPE_SPECIFIC.' AND `date_from` = \''.pSQL($date_from).'\' AND `id_feature_price`!='.(int) $id_feature_price ); } elseif ($type == 'special_day') { - $featurePrice = Db::getInstance()->getRow( + $featurePrices = Db::getInstance()->executeS( 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` WHERE `id_product`='.(int) $id_product.' AND `is_special_days_exists`=1 AND `active`=1 @@ -203,19 +203,21 @@ class HotelRoomTypeFeaturePricing extends ObjectModel AND `date_to` > \''.pSQL($date_from).'\' AND `id_feature_price`!='.(int) $id_feature_price ); - if ($featurePrice) { - $specialDays = json_decode($featurePrice['special_days']); - $currentSpecialDays = json_decode($current_Special_days); - $commonValues = array_intersect($specialDays, $currentSpecialDays); - if ($commonValues) { - return $featurePrice; + if ($featurePrices) { + foreach ($featurePrices as $featurePrice) { + $specialDays = json_decode($featurePrice['special_days']); + $currentSpecialDays = json_decode($current_Special_days); + $commonValues = array_intersect($specialDays, $currentSpecialDays); + if ($commonValues) { + return $featurePrice; + } } } return false; } elseif ($type == 'date_range') { return Db::getInstance()->getRow( 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` - WHERE `id_product`='.(int) $id_product.' + WHERE `id_product`='.(int) $id_product.' AND `active`=1 AND `date_selection_type` = '.(int) self::DATE_SELECTION_TYPE_RANGE.' AND `is_special_days_exists`=0 AND `date_from` <= \''.pSQL($date_to).'\' @@ -260,7 +262,6 @@ class HotelRoomTypeFeaturePricing extends ObjectModel $hotelRoomType = new HotelRoomType(); $context = Context::getContext(); $roomTypeRatesAndInventory = array(); - $hotelCartBookingData = new HotelCartBookingData(); $objBookingDetail = new HotelBookingDetail(); $incr = 0; $date_from = date('Y-m-d', strtotime($date_from)); @@ -283,7 +284,7 @@ class HotelRoomTypeFeaturePricing extends ObjectModel $totalAvailableRooms = 0; } - $roomTypePrice = $hotelCartBookingData->getRoomTypeTotalPrice($id_product, $currentDate, $nextDayDate); + $roomTypePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($id_product, $currentDate, $nextDayDate); $roomTypeRatesAndInventory[$incr]['date'] = $currentDate; $roomTypeRatesAndInventory[$incr]['room_types'][0]['id'] = $id_product; $roomTypeRatesAndInventory[$incr]['room_types'][0]['rates'] = $roomTypePrice; @@ -293,7 +294,7 @@ class HotelRoomTypeFeaturePricing extends ObjectModel if ($hotelRoomTypes) { $roomTypeRatesAndInventory[$incr]['date'] = $currentDate; foreach ($hotelRoomTypes as $key => $product) { - $roomTypePrice = $hotelCartBookingData->getRoomTypeTotalPrice( + $roomTypePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( $product['id_product'], $currentDate, $nextDayDate @@ -702,35 +703,45 @@ class HotelRoomTypeFeaturePricing extends ObjectModel $priceWithFeatureTI = 0; $priceWithFeatureTE = 0; } - if ($quantity) { - $totalPrice['total_price_tax_incl'] += $priceWithFeatureTI * $quantity; - $totalPrice['total_price_tax_excl'] += $priceWithFeatureTE * $quantity; - } else { - $totalPrice['total_price_tax_incl'] += $priceWithFeatureTI; - $totalPrice['total_price_tax_excl'] += $priceWithFeatureTE; - } + $totalPrice['total_price_tax_incl'] += $priceWithFeatureTI; + $totalPrice['total_price_tax_excl'] += $priceWithFeatureTE; } else { - if ($quantity) { - $totalPrice['total_price_tax_incl'] += $productPriceTI * $quantity; - $totalPrice['total_price_tax_excl'] += $productPriceTE * $quantity; - } else { - $totalPrice['total_price_tax_incl'] += $productPriceTI; - $totalPrice['total_price_tax_excl'] += $productPriceTE; - } + $totalPrice['total_price_tax_incl'] += $productPriceTI; + $totalPrice['total_price_tax_excl'] += $productPriceTE; } } if ($with_auto_room_services) { - if ($servicesWithTax = RoomTypeServiceProduct::getAutoAddServices($id_product, $date_from, $date_to, Product::PRICE_ADDITION_TYPE_WITH_ROOM, true)) { + if ($servicesWithTax = RoomTypeServiceProduct::getAutoAddServices( + $id_product, + $date_from, + $date_to, + Product::PRICE_ADDITION_TYPE_WITH_ROOM, + true, + $id_cart, + $id_guest + )) { foreach($servicesWithTax as $service) { $totalPrice['total_price_tax_incl'] += $service['price']; } } - if ($servicesWithoutTax = RoomTypeServiceProduct::getAutoAddServices($id_product, $date_from, $date_to, Product::PRICE_ADDITION_TYPE_WITH_ROOM, false)) { + if ($servicesWithoutTax = RoomTypeServiceProduct::getAutoAddServices( + $id_product, + $date_from, + $date_to, + Product::PRICE_ADDITION_TYPE_WITH_ROOM, + false, + $id_cart, + $id_guest + )) { foreach($servicesWithoutTax as $service) { $totalPrice['total_price_tax_excl'] += $service['price']; } } - } + } + if ($quantity) { + $totalPrice['total_price_tax_incl'] = $totalPrice['total_price_tax_incl'] * $quantity; + $totalPrice['total_price_tax_excl'] = $totalPrice['total_price_tax_excl'] * $quantity; + } return $totalPrice; } @@ -823,8 +834,8 @@ class HotelRoomTypeFeaturePricing extends ObjectModel */ public function updateGroup($groups) { - $this->cleanGroups(); if ($groups && !empty($groups)) { + $this->cleanGroups(); $this->addGroups($groups); } } diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeGlobalDemand.php b/modules/hotelreservationsystem/classes/HotelRoomTypeGlobalDemand.php index b5b6bfa17..96f8ab5b1 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeGlobalDemand.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeGlobalDemand.php @@ -152,4 +152,29 @@ class HotelRoomTypeGlobalDemand extends ObjectModel 'SELECT `id_option` as `id` FROM `'._DB_PREFIX_.'htl_room_type_global_demand_advance_option` WHERE `id_global_demand` = '.(int)$this->id.' ORDER BY `id` ASC' ); } + + + public function searchByName($query, $idLang = false) + { + if (!$idLang) { + $idLang = Context::getContext()->language->id; + } + + return Db::getInstance()->executeS(' + SELECT rtgd.*, rtgdl.*, rtgdao.`price` AS `option_price`, rtgdaol.`name` AS `option_name` + FROM `'._DB_PREFIX_.'htl_room_type_global_demand` rtgd + LEFT JOIN `'._DB_PREFIX_.'htl_room_type_global_demand_lang` rtgdl + ON rtgdl.`id_global_demand` = rtgd.`id_global_demand` + LEFT JOIN `'._DB_PREFIX_.'htl_room_type_global_demand_advance_option` rtgdao + ON rtgdao.`id_global_demand` = rtgd.`id_global_demand` + LEFT JOIN `'._DB_PREFIX_.'htl_room_type_global_demand_advance_option_lang` rtgdaol + ON (rtgdaol.`id_option` = rtgdao.`id_option` AND rtgdl.`id_lang` = rtgdaol.`id_lang`) + WHERE ( + rtgdl.`name` LIKE \'%'.pSQL($query).'%\' OR + rtgdaol.`name` LIKE \'%'.pSQL($query).'%\' + ) + AND rtgdl.`id_lang`='.(int) $idLang + ); + } + } diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php index 4cb2df0e2..5acb6ef60 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php @@ -47,7 +47,10 @@ class RoomTypeServiceProduct extends ObjectModel ) ); - public static function deleteRoomProductLink($idProduct, $elementType = 0) + /** + * This method deletes passed associations and cleans positions of remaining associations + */ + public static function deleteRoomProductLink($idProduct, $elementType = 0, $idElement = 0) { $where = '`id_product`='.(int)$idProduct; @@ -55,10 +58,27 @@ class RoomTypeServiceProduct extends ObjectModel $where .= ' AND `element_type`='.(int)$elementType; } - return Db::getInstance()->delete( + if ($idElement) { + $where .= ' AND `id_element` = '.(int) $idElement; + } + + // Get the list of elements before deleting associations to clean positions of remaining associations + $elements = Db::getInstance()->executeS( + 'SELECT rsp.`id_element`, rsp.`element_type` + FROM `'._DB_PREFIX_.'htl_room_type_service_product` rsp + WHERE '.$where.' + GROUP BY rsp.`element_type`, rsp.`id_element`' + ); + + $result = Db::getInstance()->delete( 'htl_room_type_service_product', $where ); + + // Clean positions of remaining associations after deletion + $result &= self::cleanPositions($elements); + + return $result; } public function addRoomProductLink($idProduct, $values, $elementType) @@ -71,7 +91,7 @@ class RoomTypeServiceProduct extends ObjectModel foreach($values as $value) { $rowData[] = array( 'id_product' => $idProduct, - 'position' => self::getHigherPosition(), + 'position' => self::getHigherPosition($value, $elementType), 'id_element' => $value, 'element_type' => $elementType ); @@ -115,12 +135,16 @@ class RoomTypeServiceProduct extends ObjectModel return Db::getInstance()->getValue($sql); } - public static function getAutoAddServices($idProduct, $dateFrom = null, $dateTo = null, $priceAdditionType = null, $useTax = null) + public static function getAutoAddServices($idProduct, $dateFrom = null, $dateTo = null, $priceAdditionType = null, $useTax = null, $idCart = 0, $idGuest = 0) { if (Product::isBookingProduct($idProduct)) { $sql = 'SELECT p.`id_product` FROM `'._DB_PREFIX_.'htl_room_type_service_product` rsp - INNER JOIN `'._DB_PREFIX_.'product` p ON (rsp.`id_product` = p.`id_product` AND p.`auto_add_to_cart` = 1) - WHERE p.`active` = 1 AND `id_element` = '.(int)$idProduct.' AND `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE; + INNER JOIN `'._DB_PREFIX_.'product` p ON (rsp.`id_product` = p.`id_product` AND p.`auto_add_to_cart` = 1)'; + if ($idCart) { + $sql .= ' INNER JOIN `'._DB_PREFIX_.'htl_room_type_service_product_cart_detail` spcd + ON (rsp.`id_product` = spcd.`id_product` AND spcd.`id_cart` = '.(int)$idCart.')'; + } + $sql .= ' WHERE p.`active` = 1 AND `id_element` = '.(int)$idProduct.' AND `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE; if (!is_null($priceAdditionType)) { $sql .= ' AND p.`price_addition_type` = '.$priceAdditionType; } @@ -216,23 +240,33 @@ class RoomTypeServiceProduct extends ObjectModel return $serviceProductsCategories; } - public static function getHigherPosition() + public static function getHigherPosition($idElement, $elementType) { $position = DB::getInstance()->getValue( - 'SELECT MAX(`position`) FROM `'._DB_PREFIX_.'htl_room_type_service_product`' + 'SELECT MAX(rsp.`position`) + FROM `'._DB_PREFIX_.'htl_room_type_service_product` AS rsp + WHERE rsp.`id_element` = '.(int) $idElement.' + AND rsp.`element_type` = '.(int) $elementType ); $result = (is_numeric($position)) ? $position : -1; return $result + 1; } - public function cleanPositions($idProductRoomType) + public static function cleanPositions($elements) { - Db::getInstance()->execute('SET @i = -1', false); - $sql = 'UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` SET `position` = @i:=@i+1 - WHERE `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE.' AND `id_element` = '.(int)$idProductRoomType.' - ORDER BY `position` ASC'; + $result = true; + foreach ($elements as $element) { + Db::getInstance()->execute('SET @i = -1', false); + $result &= Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` rsp + SET rsp.`position` = @i:=@i+1 + WHERE rsp.`element_type` = '.(int) $element['element_type'].' + AND rsp.`id_element` = '.(int) $element['id_element'].' + ORDER BY rsp.`position` ASC' + ); + } - return Db::getInstance()->execute($sql); + return $result; } /** @@ -244,22 +278,49 @@ class RoomTypeServiceProduct extends ObjectModel * @param int $idPosition * @return boolean */ - public static function changePositions($idProduct, $idElement, $toRowIndex, $idPosition) - { - if ($toRowIndex >= $idPosition) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` SET `position` = position -1 - WHERE `id_product` != '.(int) $idProduct.' AND `id_element` ='.(int) $idElement .' AND `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE.' - AND `position` <= '.(int) ($toRowIndex). ' AND `position` >= ' .(int) $idPosition); - - return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` SET `position` = '.(int) ($toRowIndex).' - WHERE `id_product` = '.(int) $idProduct.' AND `id_element` ='.(int) $idElement .' AND `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE); - } elseif ($toRowIndex < $idPosition) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` SET `position` = position +1 - WHERE `id_product` != '.(int) $idProduct.' AND `id_element` ='.(int) $idElement .' AND `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE.' - AND `position` >= '. (int) $toRowIndex. ' AND `position` <= ' .(int) $idPosition); - - return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` SET `position` = '.$toRowIndex.' - WHERE `id_product` = '.(int) $idProduct.' AND `id_element` ='.(int) $idElement .' AND `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE); + public static function updatePosition( + $idProduct, + $idElement, + $newPosition, + $elementType + ) { + if (!$result = Db::getInstance()->executeS( + 'SELECT rsp.`id_product`, rsp.`position` + FROM `'._DB_PREFIX_.'htl_room_type_service_product` rsp + WHERE rsp.`id_element` = '.(int) $idElement.' + AND rsp.`element_type` = '.(int) $elementType.' + ORDER BY rsp.`position` ASC' + )) { + return false; } + + $movedBlock = false; + foreach ($result as $block) { + if ((int) $block['id_product'] == (int) $idProduct) { + $movedBlock = $block; + } + } + + if ($movedBlock === false) { + return false; + } + + $way = ($newPosition >= $movedBlock['position']) ? 1 : 0; + + return (Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` rsp + SET rsp.`position` = `position` '.($way ? '- 1' : '+ 1').' + WHERE rsp.`id_element` = '.(int) $idElement.' + AND rsp.`element_type` = '.(int) $elementType.' + AND rsp.`position`'.($way ? '> '. + (int) $movedBlock['position'].' AND rsp.`position` <= '.(int) $newPosition : '< '. + (int) $movedBlock['position'].' AND rsp.`position` >= '.(int) $newPosition) + ) && Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_.'htl_room_type_service_product` rsp + SET rsp.`position` = '.(int) $newPosition.' + WHERE rsp.`id_element` = '.(int) $idElement.' + AND rsp.`element_type` = '.(int) $elementType.' + AND rsp.`id_product` = '.(int) $movedBlock['id_product'] + )); } -} \ No newline at end of file +} diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProductCartDetail.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProductCartDetail.php index b1917b305..5fad5a10b 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProductCartDetail.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProductCartDetail.php @@ -64,14 +64,13 @@ class RoomTypeServiceProductCartDetail extends ObjectModel } if ($updateQty = $quantity - $objRoomTypeServiceProductCartDetail->quantity) { + $way = $updateQty > 0 ? 'up' : 'down'; + $objRoomTypeServiceProductCartDetail->quantity += $updateQty; if (Product::getProductPriceCalculation($idProduct) == Product::PRICE_CALCULATION_METHOD_PER_DAY) { $objHotelCartBookingData = new HotelCartBookingData($idHtlCartData); $numdays = HotelHelper::getNumberOfDays($objHotelCartBookingData->date_from, $objHotelCartBookingData->date_to); $updateQty *= $numdays; - } - $way = $updateQty > 0 ? 'up' : 'down'; - $objRoomTypeServiceProductCartDetail->quantity = $quantity; if ($objRoomTypeServiceProductCartDetail->save()) { $objCart = new Cart($idCart); return $objCart->updateQty((int)abs($updateQty), $idProduct, null, false, $way); @@ -86,16 +85,45 @@ class RoomTypeServiceProductCartDetail extends ObjectModel public function removeServiceProductByIdHtlCartBooking($htlCartBookingId) { if ($stadardProductsData = Db::getInstance()->executeS( - 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_service_product_cart_detail` - WHERE `htl_cart_booking_id` = '.(int)$htlCartBookingId + 'SELECT * FROM `' . _DB_PREFIX_ . 'htl_room_type_service_product_cart_detail` + WHERE `htl_cart_booking_id` = ' . (int)$htlCartBookingId )) { foreach ($stadardProductsData as $product) { if (Validate::isLoadedObject( $objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail($product['id_room_type_service_product_cart_detail']) )) { + $updateQty = $product['quantity']; + if (Product::getProductPriceCalculation($product['id_product']) == Product::PRICE_CALCULATION_METHOD_PER_DAY) { + $objHotelCartBookingData = new HotelCartBookingData($idHtlCartData); + $numdays = HotelHelper::getNumberOfDays($objHotelCartBookingData->date_from, $objHotelCartBookingData->date_to); + $updateQty *= $numdays; + } if ($objRoomTypeServiceProductCartDetail->delete()) { $objCart = new Cart($product['id_cart']); - $objCart->updateQty((int)($product['quantity']), $product['id_product'], null, false, 'down'); + if (isset(Context::getContext()->controller->controller_type)) { + $controllerType = Context::getContext()->controller->controller_type; + } else { + $controllerType = 'front'; + } + if ($controllerType == 'admin' || $controllerType == 'moduleadmin') { + if ($cartQty = Cart::getProductQtyInCart($product['id_cart'], $product['id_product'])) { + if ($product['quantity'] < $cartQty) { + Db::getInstance()->update( + 'cart_product', + array('quantity' => (int)($cartQty - $product['quantity'])), + '`id_product` = '.(int)$product['id_product'].' AND `id_cart` = '.(int)$product['id_cart'] + ); + } else { + //if room type has no qty remaining in cart then delete row + Db::getInstance()->delete( + 'cart_product', + '`id_product` = '.(int)$product['id_product'].' AND `id_cart` = '.(int)$product['id_cart'] + ); + } + } + } else { + $objCart->updateQty((int)($updateQty), $product['id_product'], null, false, 'down'); + } } } } @@ -190,7 +218,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel $sql = 'SELECT rscd.`id_product`, rscd.`quantity`, cbd.`id_cart`, p.`auto_add_to_cart`, p.`allow_multiple_quantity`, cbd.`id` as `htl_cart_booking_id`, p.`price_addition_type`, cbd.`id_product` as `room_type_id_product`, pl.`name`, cbd.`date_from`, cbd.`date_to` FROM `'._DB_PREFIX_.'htl_cart_booking_data` cbd - LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product_cart_detail` rscd ON(rscd.`htl_cart_booking_id` = cbd.`id`) + INNER JOIN `'._DB_PREFIX_.'htl_room_type_service_product_cart_detail` rscd ON(rscd.`htl_cart_booking_id` = cbd.`id`) LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = rscd.`id_product`) LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int)$idLang.') WHERE 1'; @@ -328,7 +356,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel cbd.`id_product` as `room_type_id_product`, cbd.`adults`, cbd.`children`, cbd.`date_from`, cbd.`date_to`'; if (!$getTotalPrice) { $sql .= ', pl.`name`, cbd.`id_guest`, cbd.`id_customer`, p.`auto_add_to_cart`, p.`price_addition_type`, - cbd.`id_hotel`, cbd.`id_room`, cbd.`date_from`, cbd.`date_to`, cbd.`is_refunded`'; + p.`price_calculation_method`, cbd.`id_hotel`, cbd.`id_room`, cbd.`date_from`, cbd.`date_to`, cbd.`is_refunded`'; } $sql .= ' FROM `'._DB_PREFIX_.'htl_cart_booking_data` cbd LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product_cart_detail` rscd @@ -401,6 +429,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel 'quantity' => $product['quantity'], 'auto_add_to_cart' => $product['auto_add_to_cart'], 'price_addition_type' => $product['price_addition_type'], + 'price_calculation_method' => $product['price_calculation_method'], 'unit_price_tax_excl' => $objRoomTypeServiceProductPrice->getServicePrice( (int)$product['id_product'], (int)$product['room_type_id_product'], @@ -472,6 +501,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel $selectedServiceProducts[$product['htl_cart_booking_id']]['quantity'] = $product['quantity']; $selectedServiceProducts[$product['htl_cart_booking_id']]['auto_add_to_cart'] = $product['auto_add_to_cart']; $selectedServiceProducts[$product['htl_cart_booking_id']]['price_addition_type'] = $product['price_addition_type']; + $selectedServiceProducts[$product['htl_cart_booking_id']]['price_calculation_method'] = $product['price_calculation_method']; $selectedServiceProducts[$product['htl_cart_booking_id']]['unit_price_tax_excl'] = $objRoomTypeServiceProductPrice->getServicePrice( (int)$product['id_product'], (int)$product['room_type_id_product'], @@ -499,6 +529,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel 'quantity' => $product['quantity'], 'auto_add_to_cart' => $product['auto_add_to_cart'], 'price_addition_type' => $product['price_addition_type'], + 'price_calculation_method' => $product['price_calculation_method'], 'unit_price_tax_excl' => $objRoomTypeServiceProductPrice->getServicePrice( (int)$product['id_product'], (int)$product['room_type_id_product'], diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php index 4557cb4f0..b26cf751d 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php @@ -196,13 +196,14 @@ class RoomTypeServiceProductOrderDetail extends ObjectModel $sql = 'SELECT rsod.*'; if (!$getTotalPrice) { - $sql .= ', hbd.`id_product` as `room_type_id_product`, hbd.`id_room`, od.`product_allow_multiple_quantity`, + $sql .= ', hbd.`id_product` as `room_type_id_product`, hbd.`id_room`, od.`product_allow_multiple_quantity`, p.`max_quantity`, od.`product_auto_add`, od.`product_price_calculation_method`, od.`product_price_addition_type`'; } $sql .= ' FROM `'._DB_PREFIX_.'htl_booking_detail` hbd INNER JOIN `'._DB_PREFIX_.'htl_room_type_service_product_order_detail` rsod ON(rsod.`id_htl_booking_detail` = hbd.`id`)'; $sql .= ' LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON(od.`id_order_detail` = rsod.`id_order_detail`)'; + $sql .= ' INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = rsod.`id_product`)'; $sql .= ' WHERE hbd.`id` = '.(int)$idHotelBookingDetail; @@ -229,6 +230,7 @@ class RoomTypeServiceProductOrderDetail extends ObjectModel 'name' => $product['name'], 'quantity' => $product['quantity'], 'allow_multiple_quantity' => $product['product_allow_multiple_quantity'], + 'max_quantity' => $product['max_quantity'], 'product_auto_add' => $product['product_auto_add'], 'product_price_addition_type' => $product['product_price_addition_type'], 'product_price_calculation_method' => $product['product_price_calculation_method'], @@ -253,6 +255,7 @@ class RoomTypeServiceProductOrderDetail extends ObjectModel 'name' => $product['name'], 'quantity' => $product['quantity'], 'allow_multiple_quantity' => $product['product_allow_multiple_quantity'], + 'max_quantity' => $product['max_quantity'], 'product_auto_add' => $product['product_auto_add'], 'product_price_addition_type' => $product['product_price_addition_type'], 'product_price_calculation_method' => $product['product_price_calculation_method'], diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php index ea8879f6e..bfbf62f2b 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php @@ -49,7 +49,7 @@ class RoomTypeServiceProductPrice extends ObjectModel ) ); - public static function deleteRoomProductPrices($idProduct, $elementType = 0) + public static function deleteRoomProductPrices($idProduct, $elementType = 0, $idElement = 0) { $where = '`id_product`='.(int)$idProduct; @@ -57,6 +57,10 @@ class RoomTypeServiceProductPrice extends ObjectModel $where .= ' AND `element_type`='.(int)$elementType; } + if ($idElement) { + $where .= ' AND `id_element` = '.(int) $idElement; + } + return Db::getInstance()->delete( 'htl_room_type_service_product_price', $where @@ -65,12 +69,24 @@ class RoomTypeServiceProductPrice extends ObjectModel public static function getProductRoomTypePriceAndTax($idProduct, $idElement, $elementType) { - return Db::getInstance()->getRow( - 'SELECT `price`, `id_tax_rules_group` FROM `'._DB_PREFIX_.'htl_room_type_service_product_price` - WHERE `id_product`='.(int)$idProduct. - ' AND `id_element`='.(int)$idElement. - ' AND `element_type`='.(int)$elementType - ); + if ($result = Db::getInstance()->getRow(' + SELECT spp.`price`, spp.`id_tax_rules_group`, p.`auto_add_to_cart`, p.`price_addition_type` + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product` sp ON (sp.`id_product` = p.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product_price` spp ON (spp.`id_product` = p.`id_product`) + WHERE p.`id_product`='.(int)$idProduct. + ' AND sp.`id_element`='.(int)$idElement. + ' AND sp.`element_type`='.(int)$elementType) + ) { + if ($result['auto_add_to_cart'] && $result['price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM) { + // if service is auto add to cart and added in room price, we need to find room type tax rule group + if ($elementType == RoomTypeServiceProduct::WK_ELEMENT_TYPE_ROOM_TYPE) { + $result['id_tax_rules_group'] = Product::getIdTaxRulesGroupByIdProduct((int)$idElement); + } + } + } + + return $result; } public function getProductRoomTypeLinkPriceInfo($idProduct, $idElement, $elementType) diff --git a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php index 595400dce..1d0e738b3 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php @@ -112,7 +112,7 @@ class AdminAddHotelController extends ModuleAdminController $smartyVars['lang'] = true; $smartyVars['iso'] = $this->context->language->iso_code; //lang vars - $currentLangId = Configuration::get('PS_LANG_DEFAULT'); + $currentLangId = $this->default_form_language ? $this->default_form_language : Configuration::get('PS_LANG_DEFAULT'); $smartyVars['languages'] = Language::getLanguages(false); $smartyVars['currentLang'] = Language::getLanguage((int) $currentLangId); @@ -124,24 +124,19 @@ class AdminAddHotelController extends ModuleAdminController $country = $this->context->country; $smartyVars['defaultCountry'] = $country->name[Configuration::get('PS_LANG_DEFAULT')]; + $idCountry = null; if ($this->display == 'edit') { $idHotel = Tools::getValue('id'); $hotelBranchInfo = new HotelBranchInformation($idHotel); + $objCategory = new Category($hotelBranchInfo->id_category); $addressInfo = HotelBranchInformation::getAddress($idHotel); - $statesbycountry = State::getStatesByIdCountry($addressInfo['id_country']); + $idCountry = Tools::getValue('hotel_country', $addressInfo['id_country']); - $states = array(); - if ($statesbycountry) { - foreach ($statesbycountry as $key => $value) { - $states[$key]['id'] = $value['id_state']; - $states[$key]['name'] = $value['name']; - } - } $smartyVars['edit'] = 1; - $smartyVars['state_var'] = $states; $smartyVars['address_info'] = $addressInfo; $smartyVars['hotel_info'] = (array) $hotelBranchInfo; + $smartyVars['link_rewrite_info'] = $objCategory->link_rewrite; //Hotel Images $objHotelImage = new HotelImage(); if ($hotelAllImages = $objHotelImage->getImagesByHotelId($idHotel)) { @@ -175,7 +170,18 @@ class AdminAddHotelController extends ModuleAdminController $smartyVars['order_restrict_date_info'] = $restrictDateInfo; } - $smartyVars['enabledDisplayMap'] = Configuration::get('WK_GOOGLE_ACTIVE_MAP'); + // manage state option + if ($this->display == 'add') { + $idCountry = Tools::getValue('hotel_country'); + } + + $stateOptions = null; + if ($idCountry) { + $stateOptions = State::getStatesByIdCountry($idCountry); + } + + $smartyVars['state_var'] = $stateOptions; + $smartyVars['enabledDisplayMap'] = Configuration::get('PS_API_KEY') && Configuration::get('WK_GOOGLE_ACTIVE_MAP'); $smartyVars['ps_img_dir'] = _PS_IMG_.'l/'; $this->context->smarty->assign($smartyVars); @@ -183,6 +189,7 @@ class AdminAddHotelController extends ModuleAdminController Media::addJsDef( array( 'img_dir_l' => _PS_IMG_.'l/', + 'PS_ALLOW_ACCENTED_CHARS_URL' => (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'), ) ); $this->fields_form = array( @@ -249,6 +256,21 @@ class AdminAddHotelController extends ModuleAdminController } } } + + // validate Friendly URL values + if (!trim(Tools::getValue('link_rewrite_'.$defaultLangId))) { + $this->errors[] = $this->l('Friendly URL is required at least in '). + $objDefaultLanguage['name']; + } else { + foreach ($languages as $lang) { + if (trim(Tools::getValue('link_rewrite_'.$lang['id_lang']))) { + if (!Validate::isLinkRewrite(Tools::getValue('link_rewrite_'.$lang['id_lang']))) { + $this->errors[] = $this->l('Invalid Friendly URL in ').$lang['name']; + } + } + } + } + if (!$phone) { $this->errors[] = $this->l('Phone number is required field.'); } elseif (!Validate::isPhoneNumber($phone)) { @@ -311,19 +333,19 @@ class AdminAddHotelController extends ModuleAdminController if (!$enableUseGlobalMaxOrderDate) { $maximumBookingDateFormatted = date('Y-m-d', strtotime($maximumBookingDate)); if ($maximumBookingDate == '') { - $this->errors[] = Tools::displayError('Maximum Global Date to book a room is a required field.'); + $this->errors[] = $this->l('Maximum Check-out Date to book a room is a required field.'); } elseif (!Validate::isDate($maximumBookingDateFormatted)) { - $this->errors[] = Tools::displayError('Maximum Global Date to book a room is invalid.'); + $this->errors[] = $this->l('Maximum Check-out Date to book a room is invalid.'); } elseif (strtotime($maximumBookingDateFormatted) < strtotime(date('Y-m-d'))) { - $this->errors[] = Tools::displayError('Maximum Global Date to book a room can not be a past date. Please use a future date.'); + $this->errors[] = $this->l('Maximum Check-out Date to book a room can not be a past date. Please use a future date.'); } } if (!$enableUseGlobalPreparationTime) { if ($preparationTime === '') { - $this->errors[] = Tools::displayError('Preparation time is a required field.'); + $this->errors[] = $this->l('Preparation time is a required field.'); } elseif ($preparationTime !== '0' && !Validate::isUnsignedInt($preparationTime)) { - $this->errors[] = Tools::displayError('Preparation time is invalid.'); + $this->errors[] = $this->l('Preparation time is invalid.'); } } } @@ -353,6 +375,7 @@ class AdminAddHotelController extends ModuleAdminController // lang fields $hotelCatName = array(); + $linkRewriteArray = array(); foreach ($languages as $lang) { if (!trim(Tools::getValue('hotel_name_'.$lang['id_lang']))) { $objHotelBranch->hotel_name[$lang['id_lang']] = Tools::getValue( @@ -364,6 +387,16 @@ class AdminAddHotelController extends ModuleAdminController ); } + if (!trim(Tools::getValue('link_rewrite_'.$lang['id_lang']))) { + $linkRewriteArray[$lang['id_lang']] = Tools::getValue( + 'link_rewrite_'.$defaultLangId + ); + } else { + $linkRewriteArray[$lang['id_lang']] = Tools::getValue( + 'link_rewrite_'.$lang['id_lang'] + ); + } + $cleanShortDescription = Tools::getDescriptionClean( Tools::getValue('short_description_'.$lang['id_lang']) ); @@ -497,12 +530,21 @@ class AdminAddHotelController extends ModuleAdminController if ($catState) { if ($catCity = $objHotelBranch->addCategory($city, $catState, $groupIds)) { $hotelCatName = $objHotelBranch->hotel_name; - if ($catHotel = $objHotelBranch->addCategory( - $hotelCatName, $catCity, $groupIds, 1, $newIdHotel - )) { - $objHotelBranch = new HotelBranchInformation($newIdHotel); - $objHotelBranch->id_category = $catHotel; - $objHotelBranch->save(); + // add/update hotel category + if ($objHotelBranch->id_category) { + $objCategory = new Category($objHotelBranch->id_category); + $objCategory->name = $objHotelBranch->hotel_name; + $objCategory->id_parent = $catCity; + $objCategory->save(); + Category::regenerateEntireNtree(); + } else { + if ($catHotel = $objHotelBranch->addCategory( + $hotelCatName, $catCity, $groupIds, 1, $newIdHotel, $linkRewriteArray + )) { + $objHotelBranch = new HotelBranchInformation($newIdHotel); + $objHotelBranch->id_category = $catHotel; + $objHotelBranch->save(); + } } } } @@ -526,6 +568,9 @@ class AdminAddHotelController extends ModuleAdminController } } + // update room types association after category update + $objHotelBranch->updateRoomTypeCategories(); + if ($idHotel) { // save maximum booking date and preparation time $objHotelOrderRestrictDate = new HotelOrderRestrictDate(); @@ -600,16 +645,15 @@ class AdminAddHotelController extends ModuleAdminController public function ajaxProcessStateByCountryId() { - $states = array(); + $response = array('status' => false, 'states' => array()); if ($idCountry = Tools::getValue('id_country')) { - if ($statesbycountry = State::getStatesByIdCountry($idCountry)) { - foreach ($statesbycountry as $key => $value) { - $states[$key]['id'] = $value['id_state']; - $states[$key]['name'] = $value['name']; - } + if ($states = State::getStatesByIdCountry($idCountry)) { + $response['status'] = true; + $response['states'] = $states; } } - die(json_encode($states)); + + $this->ajaxDie(json_encode($response)); } public function ajaxProcessUploadHotelImages() diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php index 3e6435433..d77a293a2 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelFeaturePricesSettings.php @@ -173,6 +173,31 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController return $this->context->smarty->fetch(_PS_MODULE_DIR_.$tpl_path); } + public function processStatus() + { + $objFeaturePricing = $this->loadObject(); + if (!$objFeaturePricing->active) { + if ($this->validateExistingFeaturePrice( + $objFeaturePricing->date_selection_type, + $objFeaturePricing->id_product, + $objFeaturePricing->date_from, + $objFeaturePricing->date_to, + $objFeaturePricing->id, + $objFeaturePricing->is_special_days_exists, + $objFeaturePricing->special_days + + + )) { + $this->errors[] = $this->l('An advanced price rule already exists in which some dates are common with this + plan. Please select a different date range.'); + return ; + } + } + + return parent::processStatus(); + + } + public function initToolbar() { parent::initToolbar(); @@ -197,7 +222,7 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController $currencySign = $objCurrency->sign; $dateFrom = date('d-m-Y'); $dateTo = date('d-m-Y', strtotime($dateFrom) + 86400); - $currentLangId = Configuration::get('PS_LANG_DEFAULT'); + $currentLangId = $this->default_form_language ? $this->default_form_language : Configuration::get('PS_LANG_DEFAULT'); $smartyVars['languages'] = Language::getLanguages(false); $smartyVars['currentLang'] = Language::getLanguage((int) $currentLangId); @@ -253,6 +278,46 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController } } + public function validateExistingFeaturePrice( + $dateSelectionType, + $roomTypeId, + $dateFrom, + $dateTo, + $idFeaturePrice, + $isSpecialDaysExists = false, + $jsonSpecialDays = "false" + ) { + $objFeaturePricing = new HotelRoomTypeFeaturePricing(); + if ($dateSelectionType == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC) { + return $objFeaturePricing->checkRoomTypeFeaturePriceExistance( + $roomTypeId, + $dateFrom, + $dateTo, + 'specific_date', + false, + $idFeaturePrice + ); + } elseif (isset($isSpecialDaysExists) && $isSpecialDaysExists && $jsonSpecialDays != "false") { + return $objFeaturePricing->checkRoomTypeFeaturePriceExistance( + $roomTypeId, + $dateFrom, + $dateTo, + 'special_day', + $jsonSpecialDays, + $idFeaturePrice + ); + } else { + return $objFeaturePricing->checkRoomTypeFeaturePriceExistance( + $roomTypeId, + $dateFrom, + $dateTo, + 'date_range', + false, + $idFeaturePrice + ); + } + } + public function processSave() { $idFeaturePrice = Tools::getValue('id_feature_price'); @@ -281,40 +346,26 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController $languages = Language::getLanguages(false); $objDefaultLang = new language($defaultLangId); - $isPlanTypeExists = 0; + if ($dateSelectionType == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC) { - $isPlanTypeExists = $objFeaturePricing->checkRoomTypeFeaturePriceExistance( - $roomTypeId, - $specificDate, - date('Y-m-d', strtotime("+1 day", strtotime($specificDate))), - 'specific_date', - false, - $idFeaturePrice - ); - } elseif (isset($isSpecialDaysExists) && $isSpecialDaysExists == 'on') { - if ($jsonSpecialDays != "false") { - $isPlanTypeExists = $objFeaturePricing->checkRoomTypeFeaturePriceExistance( - $roomTypeId, - $dateFrom, - $dateTo, - 'special_day', - $jsonSpecialDays, - $idFeaturePrice - ); - } else { - $this->errors[] = $this->l('Please select at least one day for the special day selection.'); - } + $dateFrom = $specificDate; + $dateTo = date('Y-m-d', strtotime("+1 day", strtotime($specificDate))); + } + + $isPlanTypeExists = 0; + if ($isSpecialDaysExists && $jsonSpecialDays == 'false') { + $this->errors[] = $this->l('Please select at least one day for week days restriction.'); } else { - $isPlanTypeExists = $objFeaturePricing->checkRoomTypeFeaturePriceExistance( + $isPlanTypeExists = $this->validateExistingFeaturePrice( + $dateSelectionType, $roomTypeId, $dateFrom, $dateTo, - 'date_range', - false, - $idFeaturePrice + $idFeaturePrice, + $isSpecialDaysExists, + $jsonSpecialDays ); } - if ($isPlanTypeExists) { $this->errors[] = $this->l('An advanced price rule already exists in which some dates are common with this plan. Please select a different date range.'); @@ -361,14 +412,10 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController if ($dateTo < $dateFrom) { $this->errors[] = $this->l('Date To must be a date after Date From.'); } - if (isset($isSpecialDaysExists) && $isSpecialDaysExists == 'on') { - $isSpecialDaysExists = 1; + if ($isSpecialDaysExists) { if (!isset($specialDays) || !$specialDays) { - $isSpecialDaysExists = 0; - $this->errors[] = $this->l('Please select at least one day for the special day selection.'); + $this->errors[] = $this->l('Please select at least one day for week days restriction.'); } - } else { - $isSpecialDaysExists = 0; } } else { if ($specificDate == '') { @@ -410,14 +457,8 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController } } $objFeaturePricing->date_selection_type = $dateSelectionType; - - if ($dateSelectionType == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE) { - $objFeaturePricing->date_from = $dateFrom; - $objFeaturePricing->date_to = $dateTo; - } else { - $objFeaturePricing->date_from = $specificDate; - $objFeaturePricing->date_to = date('Y-m-d', strtotime($specificDate) + 86400); - } + $objFeaturePricing->date_from = $dateFrom; + $objFeaturePricing->date_to = $dateTo; $objFeaturePricing->impact_way = $priceImpactWay; $objFeaturePricing->is_special_days_exists = $isSpecialDaysExists; $objFeaturePricing->special_days = $jsonSpecialDays; diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php index 74e120141..30b34ea38 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php @@ -43,7 +43,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController $this->fields_options = array( 'hotelsearchpanel' => array( 'icon' => 'icon-search', - 'title' => $this->l('Hotel Search Setting'), + 'title' => $this->l('Search Panel Setting'), 'fields' => array( 'WK_HOTEL_LOCATION_ENABLE' => array( 'title' => $this->l('Enable Hotel Location'), @@ -86,72 +86,9 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'title' => $this->l('Save'), ), ), - 'occupancypanel' => array( - 'icon' => 'icon-users', - 'title' => $this->l('Occupancy Setting'), - 'fields' => array( - // max age of child - 'WK_GLOBAL_CHILD_MAX_AGE' => array( - 'title' => $this->l('Consider guest as child below age'), - 'type' => 'text', - 'required' => true, - 'validation' => 'isUnsignedInt', - 'hint' => $this->l('Enter the age of the guest, which that guest will be considered as child.'), - ), - 'WK_GLOBAL_MAX_CHILD_IN_ROOM' => array( - 'title' => $this->l('Maximum children allowed in a room'), - 'type' => 'text', - 'required' => true, - 'validation' => 'isUnsignedInt', - 'hint' => $this->l('Enter number of the child allowed in a room.'), - 'desc' => $this->l('Set as 0 if you do not want to limit children in a room.') - ), - ), - 'submit' => array( - 'title' => $this->l('Save'), - ), - ), 'generalsetting' => array( - 'title' => $this->l('Configuration'), + 'title' => $this->l('Website Configuration'), 'fields' => array( - 'WK_ROOM_LEFT_WARNING_NUMBER' => array( - 'title' => $this->l('Display remaining Number of rooms when the rooms are lower than or equal to'), - 'hint' => $this->l('Mention the minimum quantity of rooms after which alert message of remaining rooms will get displayed to users.'), - 'validation' => 'isInt', - 'cast' => 'intval', - 'type' => 'text', - 'visibility' => Shop::CONTEXT_ALL, - ), - 'WK_HOTEL_GLOBAL_ADDRESS' => array( - 'title' => $this->l('Global Address'), - 'hint' => $this->l('Hotel global address which you want to show to your customers. It will be - shown at contact us page.'), - 'type' => 'text', - 'isCleanHtml' => true, - ), - 'WK_HOTEL_GLOBAL_CONTACT_EMAIL' => array( - 'title' => $this->l('Global Email'), - 'hint' => $this->l('Email which you want to show a customer to email you.'), - 'type' => 'text', - ), - 'WK_HOTEL_GLOBAL_CONTACT_NUMBER' => array( - 'title' => $this->l('Global Contact Number'), - 'hint' => $this->l('Phone Number which you want to show a customer to contact you.'), - 'type' => 'text', - 'validation' => 'isPhoneNumber', - ), - 'WK_HTL_ESTABLISHMENT_YEAR' => array( - 'title' => $this->l('Website Launch Year'), - 'hint' => $this->l('The year when your hotel site was launched.'), - 'type' => 'text', - ), - 'WK_PRIMARY_HOTEL' => array( - 'title' => $this->l('Primary hotel'), - 'hint' => $this->l('Primary hotel is used to default address for your business. The hotel address will be considered as your registered business address.'), - 'type' => 'select', - 'identifier' => 'id', - 'list' => $hotelsInfo, - ), 'WK_HTL_CHAIN_NAME' => array( 'title' => $this->l('Hotel Name'), 'type' => 'textLang', @@ -178,6 +115,19 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'validation' => 'isGenericName', 'hint' => $this->l('This will display hotel short description in footer. Note: number of letters must be less than 220.'), ), + 'WK_PRIMARY_HOTEL' => array( + 'title' => $this->l('Primary hotel'), + 'hint' => $this->l('Primary hotel is used to default address for your business. The hotel address will be considered as your registered business address.'), + 'type' => 'select', + 'identifier' => 'id', + 'list' => $hotelsInfo, + ), + 'WK_HTL_ESTABLISHMENT_YEAR' => array( + 'title' => $this->l('Website Launch Year'), + 'hint' => $this->l('The year when your hotel site was launched.'), + 'type' => 'text', + 'class' => 'fixed-width-xxl', + ), 'WK_HTL_HEADER_IMAGE' => array( 'title' => $this->l('Header Background Image'), 'type' => 'file', @@ -189,6 +139,50 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController ), 'submit' => array('title' => $this->l('Save')), ), + 'contactdetail' => array( + 'icon' => 'icon-phone', + 'title' => $this->l('Website Contact Details'), + 'fields' => array( + 'WK_HOTEL_GLOBAL_ADDRESS' => array( + 'title' => $this->l('Main Branch Address'), + 'hint' => $this->l('The address of the main branch. It will be shown on Contact Us page.'), + 'type' => 'text', + 'isCleanHtml' => true, + 'class' => 'fixed-width-xxl', + 'required' => true, + ), + 'WK_HOTEL_GLOBAL_CONTACT_NUMBER' => array( + 'title' => $this->l('Main Branch Phone Number'), + 'hint' => $this->l('The phone number of the main branch. It will be shown on Contact Us page.'), + 'type' => 'text', + 'validation' => 'isPhoneNumber', + 'class' => 'fixed-width-xxl', + 'required' => true, + ), + 'WK_HOTEL_GLOBAL_CONTACT_EMAIL' => array( + 'title' => $this->l('Main Branch Email'), + 'hint' => $this->l('The email address of the main branch. It will be shown on Contact Us page.'), + 'type' => 'text', + 'class' => 'fixed-width-xxl', + 'required' => true, + ), + 'WK_CUSTOMER_SUPPORT_PHONE_NUMBER' => array( + 'title' => $this->l('Support Phone Number'), + 'type' => 'text', + 'hint' => $this->l('The phone number used for customer service. It will be shown on navigation bar.'), + 'class' => 'fixed-width-xxl', + ), + 'WK_CUSTOMER_SUPPORT_EMAIL' => array( + 'title' => $this->l('Support Email'), + 'type' => 'text', + 'hint' => $this->l('The email used for customer service. It will be shown on navigation bar.'), + 'class' => 'fixed-width-xxl', + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + ), + ), 'advancedPayment' => array( 'title' => $this->l('Advance Payment Global Setting'), 'fields' => array( @@ -215,6 +209,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'type' => 'text', 'validation' => 'isUnsignedFloat', 'suffix' => $this->l('%'), + 'class' => 'fixed-width-xxl', ), 'WK_ADVANCED_PAYMENT_INC_TAX' => array( 'title' => $this->l('Global Booking Amount Include Tax'), @@ -236,6 +231,33 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController ), 'submit' => array('title' => $this->l('Save')), ), + 'occupancypanel' => array( + 'icon' => 'icon-users', + 'title' => $this->l('Occupancy Settings'), + 'fields' => array( + // max age of child + 'WK_GLOBAL_CHILD_MAX_AGE' => array( + 'title' => $this->l('Consider guest as child below age'), + 'type' => 'text', + 'required' => true, + 'validation' => 'isUnsignedInt', + 'hint' => $this->l('Enter the age of the guest, which that guest will be considered as child.'), + 'class' => 'fixed-width-xxl', + ), + 'WK_GLOBAL_MAX_CHILD_IN_ROOM' => array( + 'title' => $this->l('Maximum children allowed in a room'), + 'type' => 'text', + 'required' => true, + 'validation' => 'isUnsignedInt', + 'hint' => $this->l('Enter number of the child allowed in a room.'), + 'desc' => $this->l('Set as 0 if you do not want to limit children in a room.'), + 'class' => 'fixed-width-xxl', + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + ), + ), 'googleMap' => array( 'title' => $this->l('Google Maps Settings'), 'fields' => array( @@ -377,6 +399,16 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController } elseif (!Validate::isEmail(Tools::getValue('WK_HOTEL_GLOBAL_CONTACT_EMAIL'))) { $this->errors[] = $this->l('Hotel global contact email field is invalid'); } + if (trim(Tools::getValue('WK_CUSTOMER_SUPPORT_PHONE_NUMBER')) != '') { + if (!Validate::isPhoneNumber(trim(Tools::getValue('WK_CUSTOMER_SUPPORT_PHONE_NUMBER')))) { + $this->errors[] = $this->l('Support Phone Number is invalid.'); + } + } + if (trim(Tools::getValue('WK_CUSTOMER_SUPPORT_EMAIL')) != '') { + if (!Validate::isEmail(trim(Tools::getValue('WK_CUSTOMER_SUPPORT_EMAIL')))) { + $this->errors[] = $this->l('Support Email is invalid.'); + } + } if (!count($this->errors)) { $objHotelInfo = new HotelBranchInformation(); diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php index 6146e43f4..0edf2d641 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php @@ -30,25 +30,25 @@ class AdminHotelRoomsBookingController extends ModuleAdminController parent::__construct(); - $this->initCart(); + $this->_conf[52] = $this->l('Room in the booking is successfully reallocated'); + $this->_conf[53] = $this->l('Room in the booking is successfully swapped'); } - public function initCart() + public function init() { - if (!isset($this->context->cookie->id_guest)) { - Guest::setNewGuest($this->context->cookie); - } + parent::init(); - if (!isset($this->context->cookie->id_cart)) { - $objCart = $this->createNewCart(); - $this->context->cookie->id_cart = (int) $objCart->id; - } else { - // use previous cart - if (!validate::isLoadedObject($objCart = new Cart($this->context->cookie->id_cart))) { - $objCart = $this->createNewCart(); + if (isset($this->context->cookie->id_cart)) { + $objCart = new Cart($this->context->cookie->id_cart); + if (Validate::isLoadedObject($objCart) && !$objCart->orderExists()) { + $this->context->cart = $objCart; + } else { + $this->context->cookie->id_cart = 0; // remove invalid id_cart + $this->context->cart = new Cart(); } + } else { + $this->context->cart = new Cart(); } - $this->context->cart = $objCart; $objCustomer = new Customer(); $objCustomer->id_gender = 0; @@ -63,76 +63,113 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $objCustomer->id_guest = (int) $this->context->cookie->id_guest; $this->context->customer = $objCustomer; + if ($this->context->employee->isSuperAdmin()) { + $backOrderConfigKey = 'PS_BACKDATE_ORDER_SUPERADMIN'; + } else { + $backOrderConfigKey = 'PS_BACKDATE_ORDER_EMPLOYEES'; + } + if (!Configuration::get($backOrderConfigKey)) { + $htlCart = new HotelCartBookingData(); + $htlCart->removeBackdateRoomsFromCart($this->context->cart->id); + } } protected function createNewCart() { - // create a new cart - $objCart = new Cart(); - $objCart->recyclable = 0; - $objCart->gift = 0; - $objCart->id_shop = (int) $this->context->shop->id; - $objCart->id_lang = (($id_lang = (int) Tools::getValue('id_lang')) ? $id_lang : (int) Configuration::get('PS_LANG_DEFAULT')); - $objCart->id_currency = (($id_currency = (int) Tools::getValue('id_currency')) ? $id_currency : (int) Configuration::get('PS_CURRENCY_DEFAULT')); - $objCart->id_address_delivery = 0; - $objCart->id_address_invoice = 0; - $objCart->id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT'); - $objCart->id_guest = (int) $this->context->cookie->id_guest; - $objCart->setNoMultishipping(); + // Create a new guest first if needed + if (!isset($this->context->cookie->id_guest)) { + Guest::setNewGuest($this->context->cookie); + } - $objCart->save(); - return $objCart; + $this->context->cart = new Cart(); + $this->context->cart->gift = 0; + $this->context->cart->id_shop = (int) $this->context->shop->id; + $this->context->cart->id_lang = (($id_lang = (int) Tools::getValue('id_lang')) ? $id_lang : (int) Configuration::get('PS_LANG_DEFAULT')); + $this->context->cart->id_currency = (($id_currency = (int) Tools::getValue('id_currency')) ? $id_currency : (int) Configuration::get('PS_CURRENCY_DEFAULT')); + $this->context->cart->id_address_delivery = 0; + $this->context->cart->id_address_invoice = 0; + $this->context->cart->id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT'); + $this->context->cart->id_guest = (int) $this->context->cookie->id_guest; + $this->context->cart->setNoMultishipping(); + $this->context->cart->save(); + + $this->context->cookie->id_cart = (int) $this->context->cart->id; } - public function postProcess() { - if (Tools::getValue('date_from')) { - $date_from = Tools::getValue('date_from'); - } else { - $date_from = date('Y-m-d'); - } - if (Tools::getValue('date_to')) { - $date_to = Tools::getValue('date_to'); - } else { - $date_to = date('Y-m-d'); - if (strtotime($date_from) >= strtotime($date_to)) { - $date_to = date('Y-m-d', strtotime('+1 day', strtotime($date_to))); - } - } + $objHotelBranchInformation = new HotelBranchInformation(); + $hotelBranchesInfo = $objHotelBranchInformation->hotelBranchesInfo(false, 1); + // filter hotels as per accessed hotels + $hotelBranchesInfo = HotelBranchInformation::filterDataByHotelAccess($hotelBranchesInfo, $this->context->employee->id_profile, 1); - if (Tools::getValue('id_hotel')) { - $id_hotel = Tools::getValue('id_hotel'); - } else { - $obj_htl_info = new HotelBranchInformation(); - if ($htl_info = $obj_htl_info->hotelBranchesInfo(false, 1)) { - // filter hotels as per accessed hotels - $htl_info = HotelBranchInformation::filterDataByHotelAccess( - $htl_info, - $this->context->employee->id_profile, - 1 - ); - $id_hotel = reset($htl_info)['id']; + if ($hotelBranchesInfo) { + if (Tools::getValue('date_from')) { + $date_from = Tools::getValue('date_from'); } else { - $id_hotel = 0; + $date_from = date('Y-m-d'); + } + if ($this->context->employee->isSuperAdmin()) { + $backOrderConfigKey = 'PS_BACKDATE_ORDER_SUPERADMIN'; + } else { + $backOrderConfigKey = 'PS_BACKDATE_ORDER_EMPLOYEES'; + } + if (!Configuration::get($backOrderConfigKey)) { + if (strtotime(date('Y-m-d')) > strtotime($date_from)) { + $date_from = date('Y-m-d'); + } + } + if (Tools::getValue('date_to')) { + $date_to = Tools::getValue('date_to'); + } else { + $date_to = date('Y-m-d'); + if (strtotime($date_from) >= strtotime($date_to)) { + $date_to = date('Y-m-d', strtotime('+1 day', strtotime($date_to))); + } } - } - if (Tools::getValue('id_room_type')) { - $id_room_type = Tools::getValue('id_room_type'); - } else { - $id_room_type = 0; - } + if (Tools::getValue('id_hotel')) { + $id_hotel = Tools::getValue('id_hotel'); + } else { + if ($htl_info = $objHotelBranchInformation->hotelBranchesInfo(false, 1)) { + // filter hotels as per accessed hotels + $htl_info = HotelBranchInformation::filterDataByHotelAccess( + $htl_info, + $this->context->employee->id_profile, + 1 + ); + $id_hotel = reset($htl_info)['id']; + } else { + $id_hotel = 0; + } + } - $occupancy = Tools::getValue('occupancy'); - if (!Validate::isOccupancy($occupancy)) { - $occupancy = array(); - } + if (Tools::getValue('id_room_type')) { + $id_room_type = Tools::getValue('id_room_type'); + } else { + $id_room_type = 0; + } - // $booking_product = 1; - // if (Tools::getisset('booking_product')) { - // $booking_product = Tools::getValue('booking_product'); - // } + $occupancy = Tools::getValue('occupancy'); + if (!Validate::isOccupancy($occupancy)) { + $occupancy = array(); + } + + // $booking_product = 1; + // if (Tools::getisset('booking_product')) { + // $booking_product = Tools::getValue('booking_product'); + // } + + $this->id_cart = (int) $this->context->cart->id; + $this->id_guest = (int) $this->context->cookie->id_guest; + $this->id_hotel = $id_hotel; + $this->id_room_type = $id_room_type; + $this->date_from = $date_from; + $this->date_to = $date_to; + // $this->booking_product = $booking_product; + $this->booking_product = 1; + $this->occupancy = $occupancy; + } if (Tools::isSubmit('search_hotel_list')) { $urlData = array ( @@ -146,95 +183,98 @@ class AdminHotelRoomsBookingController extends ModuleAdminController Tools::redirectAdmin($this->context->link->getAdminLink('AdminHotelRoomsBooking').'&'.http_build_query($urlData)); } + // Process reallocation of rooms if (Tools::isSubmit('realloc_allocated_rooms')) { - $current_room_id = Tools::getValue('modal_id_room'); - $current_room = Tools::getValue('modal_curr_room_num'); - $date_from = Tools::getValue('modal_date_from'); - $date_to = Tools::getValue('modal_date_to'); - $realloc_room_id = Tools::getValue('realloc_avail_rooms'); + $idOrder = Tools::getValue('id_order'); + $idHtlBookingFrom = Tools::getValue('id_htl_booking'); + $idNewRoomType = Tools::getValue('realloc_avail_room_type'); + $idRoomToReallocate = Tools::getValue('realloc_avail_rooms'); + $priceDiff = Tools::getValue('reallocation_price_diff'); - if ($realloc_room_id == 0) { - $this->errors[] = $this->l('Please select a room to swap with this room.'); - } - if ($current_room_id == 0) { - $this->errors[] = $this->l('Cuurent room is missing.'); - } - if ($date_from == 0) { - $this->errors[] = $this->l('Check In date is missing.'); - } - if ($date_to == 0) { - $this->errors[] = $this->l('Check Out date is missing.'); + $objBookingDetail = new HotelBookingDetail(); + if ($idRoomToReallocate) { + // check if room is from selected room type + if (Validate::isLoadedObject($objRoomInfo = new HotelRoomInformation($idRoomToReallocate))) { + if ($objRoomInfo->id_product != $idNewRoomType) { + $this->errors[] = $this->l('Invalid room selected for reallocation.'); + } elseif (!Validate::isLoadedObject($objHotelBooking = new HotelBookingDetail($idHtlBookingFrom))) { + $this->errors[] = $this->l('Invalid booking found for reallocation.'); + } elseif (!$availableRooms = $objBookingDetail->getAvailableRoomsForReallocation( + $objHotelBooking->date_from, + $objHotelBooking->date_to, + $idNewRoomType, + $objHotelBooking->id_hotel + )) { + $this->errors[] = $this->l('Selected room is not available for reallocation.'); + } elseif (!in_array($idRoomToReallocate, array_column($availableRooms, 'id_room'))) { + $this->errors[] = $this->l('Selected room is not available for reallocation.'); + } elseif (!Validate::isFloat($priceDiff)) { + $this->errors[] = $this->l('Invalid price difference of the room types.'); + } + } else { + $this->errors[] = $this->l('Selected room is not available for reallocation.'); + } + } else { + $this->errors[] = $this->l('Please select a room to reallocate with this room.'); } if (!count($this->errors)) { - $obj_booking_dtl = new HotelBookingDetail(); - $room_swapped = $obj_booking_dtl->reallocateRoomWithAvailableSameRoomType( - $current_room_id, - $date_from, - $date_to, - $realloc_room_id - ); - if (!$room_swapped) { + // Finally, reallocate the room + if ($objBookingDetail->reallocateBooking($idHtlBookingFrom, $idRoomToReallocate, $priceDiff)) { + Tools::redirectAdmin(self::$currentIndex.'&conf=52&token='.$this->token); + } else { $this->errors[] = $this->l('Some error occured. Please try again.'); } } } + + // Process swap of rooms if (Tools::isSubmit('swap_allocated_rooms')) { - $current_room_id = Tools::getValue('modal_id_room'); - $current_room = Tools::getValue('modal_curr_room_num'); - $date_from = Tools::getValue('modal_date_from'); - $date_to = Tools::getValue('modal_date_to'); - $swapped_room_id = Tools::getValue('swap_avail_rooms'); + $idOrder = Tools::getValue('id_order'); + $idHtlBookingFrom = Tools::getValue('id_htl_booking'); + $idHtlBookingToSwap = Tools::getValue('swap_avail_rooms'); - if ($swapped_room_id == 0) { - $this->errors[] = $this->l('Please select aroom to swap with thisroom.'); - } - if ($current_room_id == 0) { - $this->errors[] = $this->l('Cuurentroom is missing.'); - } - if ($date_from == 0) { - $this->errors[] = $this->l('Check In date is missing.'); - } - if ($date_to == 0) { - $this->errors[] = $this->l('Check Out date is missing.'); + if (!Validate::isLoadedObject($objHotelBooking = new HotelBookingDetail($idHtlBookingFrom))) { + $this->errors[] = $this->l('Selected room is not available to swap.'); + } else { + if (!Validate::isLoadedObject($objHotelBookingTo = new HotelBookingDetail($idHtlBookingToSwap))) { + $this->errors[] = $this->l('Please select a room to swap with this room booking.'); + } else { + if ($availableRooms = $objHotelBooking->getAvailableRoomsForSwapping( + $objHotelBooking->date_from, + $objHotelBooking->date_to, + $objHotelBooking->id_product, + $objHotelBooking->id_hotel, + $objHotelBooking->id_room + )) { + if (!in_array($idHtlBookingToSwap, array_column($availableRooms, 'id_hotel_booking'))) { + $this->errors[] = $this->l('Selected room is not available to swap.'); + } + } else { + $this->errors[] = $this->l('Selected room is not available to swap.'); + } + } } if (!count($this->errors)) { - $obj_booking_dtl = new HotelBookingDetail(); - $room_swapped = $obj_booking_dtl->swapRoomWithAvailableSameRoomType( - $current_room_id, - $date_from, - $date_to, - $swapped_room_id - ); - if (!$room_swapped) { + $objBookingDetail = new HotelBookingDetail(); + if ($objBookingDetail->swapBooking($idHtlBookingFrom, $idHtlBookingToSwap)) { + Tools::redirectAdmin(self::$currentIndex.'&conf=53&token='.$this->token); + } else { $this->errors[] = $this->l('Some error occured. Please try again.'); } } } - $this->id_cart = $this->context->cart->id; - $this->id_guest = $this->context->cookie->id_guest; - $this->id_hotel = $id_hotel; - $this->id_room_type = $id_room_type; - $this->date_from = $date_from; - $this->date_to = $date_to; - // $this->booking_product = $booking_product; - $this->booking_product = 1; - $this->occupancy = $occupancy; - parent::postprocess(); } public function initContent() { - // $this->show_toolbar = false; $this->toolbar_title = $this->l('Book Now'); $this->display = 'view'; parent::initContent(); - // $this->content = $this->renderView(); - // $this->context->smarty->assign('content', $this->content); } public function initSearchFormData() @@ -277,19 +317,24 @@ class AdminHotelRoomsBookingController extends ModuleAdminController public function renderView() { - $this->tpl_view_vars = array( - 'id_cart' => $this->context->cart->id, - 'id_guest' => $this->context->cookie->id_guest, - ); - $this->initSearchFormData(); - if (count($this->tpl_view_vars['hotel_list'])) { - if ($this->booking_product) { - $this->assignRoomBookingForm(); - } else { - $this->assignServiceProductsForm(); - } + $objHotelBranchInformation = new HotelBranchInformation(); + $hotelBranchesInfo = $objHotelBranchInformation->hotelBranchesInfo(false, 1); + // filter hotels as per accessed hotels + $hotelBranchesInfo = HotelBranchInformation::filterDataByHotelAccess($hotelBranchesInfo, $this->context->employee->id_profile, 1); - $this->initCartData(); + if ($hotelBranchesInfo) { + $this->tpl_view_vars['id_cart'] = (int) $this->context->cart->id; + $this->tpl_view_vars['id_guest'] = (int) $this->context->cookie->id_guest; + $this->initSearchFormData(); + if (count($hotelBranchesInfo)) { + if ($this->booking_product) { + $this->assignRoomBookingForm(); + } else { + $this->assignServiceProductsForm(); + } + + $this->initCartData(); + } } return parent::renderView(); @@ -352,10 +397,8 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $objHotelServiceProductCartDetail = new HotelServiceProductCartDetail(); if ($cartProducts = $this->context->cart->getProducts()) { - if ($cart_bdata = $objHotelCartBookingData->getCartBookingDetailsByIdCartIdGuest( - $this->context->cart->id, - $this->context->cookie->id_guest, - $this->context->employee->id_lang + if ($cart_bdata = $objHotelCartBookingData->getCartFormatedBookinInfoByIdCart( + $this->context->cart->id )) { $smartyVars['cart_bdata'] = $cart_bdata; } @@ -368,7 +411,9 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $smartyVars['rms_in_cart'] = $objHotelCartBookingData->getCountRoomsInCart($this->id_cart, $this->id_guest); $smartyVars['products_in_cart'] = $products_in_cart; $smartyVars['total_products_in_cart'] = (int)$rms_in_cart + (int)$products_in_cart; - $smartyVars['cart_tamount'] = $this->context->cart->getOrderTotal(); + $cartAmountTotal = $this->context->cart->getOrderTotal(false); + $cartAmountConvenienceFee = $this->context->cart->getOrderTotal(false, cart::ONLY_CONVENIENCE_FEE); + $smartyVars['cart_tamount'] = $cartAmountTotal - $cartAmountConvenienceFee; $this->context->smarty->assign($smartyVars); } @@ -418,7 +463,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $bookingParams['date_from'] = $searchDateFrom; $bookingParams['date_to'] = $searchDateTo; $bookingParams['hotel_id'] = $searchIdHotel; - $bookingParams['room_type'] = $searchIdRoomType; + $bookingParams['id_room_type'] = $searchIdRoomType; $bookingParams['adults'] = $adults; $bookingParams['children'] = $children; $bookingParams['num_rooms'] = $num_rooms; @@ -662,6 +707,11 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $direction = 'down'; } + // Create new cart if needed + if (!Validate::isLoadedObject($this->context->cart) && $direction == 'up') { + $this->createNewCart(); + } + $id_cart = $this->context->cart->id; $id_guest = $this->context->cookie->id_guest; @@ -686,7 +736,9 @@ class AdminHotelRoomsBookingController extends ModuleAdminController array(), array(), $id_cart, - $id_guest + $id_guest, + $booking_type, + $comment )) { $response['success'] = true; $response['data']['id_cart_book_data'] = $idHotelCartBooking; @@ -725,7 +777,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController public function assignServiceProductsForm() { $objProduct = new Product(); - $serviceProducts = $objProduct->getServiceProducts($this->context->language->id); + $serviceProducts = $objProduct->getServiceProducts(null, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE); $hotelAddressInfo = HotelBranchInformation::getAddress($this->id_hotel); $serviceProducts = Product::getProductsProperties($this->context->language->id, $serviceProducts); $this->context->smarty->assign(array( @@ -767,6 +819,19 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $objHotelRoomType = new HotelRoomType(); foreach ($booking_data['rm_data'] as $key_bk_data => $value_bk_data) { $booking_data['rm_data'][$key_bk_data]['room_type_info'] = $objHotelRoomType->getRoomTypeInfoByIdProduct($value_bk_data['id_product']); + + // set default occupancies in required format + $occupancy = array( + array( + 'adults' => $value_bk_data['adults'], + 'children' => 0, + 'child_ages' => array(), + ), + ); + + $booking_data['rm_data'][$key_bk_data]['occupancies'] = $occupancy; + $booking_data['rm_data'][$key_bk_data]['occupancy_adults'] = $booking_data['rm_data'][$key_bk_data]['adults']; // only one room by default + if (isset($value_bk_data['data']['booked']) && $value_bk_data['data']['booked']) { foreach ($value_bk_data['data']['booked'] as $booked_k1 => $booked_v1) { if (isset($booked_v1['detail']) && $booked_v1['detail']) { @@ -782,7 +847,16 @@ class AdminHotelRoomsBookingController extends ModuleAdminController } else { $booking_data['rm_data'][$key_bk_data]['data']['booked'][$booked_k1]['detail'][$kDtl]['alloted_cust_email'] = "No customer email found"; } - $booking_data['rm_data'][$key_bk_data]['data']['booked'][$booked_k1]['detail'][$kDtl]['avail_rooms_to_realloc'] = $obj_booking_dtl->getAvailableRoomsForReallocation($booked_v1['detail'][$kDtl]['date_from'], $booked_v1['detail'][$kDtl]['date_to'], $booked_v1['id_product'], $booked_v1['id_hotel']); + + if (Validate::isLoadedObject($objHotelBooking = new HotelBookingDetail($bookedDtls['id_htl_booking']))) { + $booking_data['rm_data'][$key_bk_data]['data']['booked'][$booked_k1]['detail'][$kDtl]['room_type_name'] = $objHotelBooking->room_type_name; + $booking_data['rm_data'][$key_bk_data]['data']['booked'][$booked_k1]['detail'][$kDtl]['id_order'] = $objHotelBooking->id_order; + + $objOrder = new Order($objHotelBooking->id_order); + $booking_data['rm_data'][$key_bk_data]['data']['booked'][$booked_k1]['detail'][$kDtl]['currency_sign'] = (new Currency($objOrder->id_currency))->sign; + } + + $booking_data['rm_data'][$key_bk_data]['data']['booked'][$booked_k1]['detail'][$kDtl]['avail_room_types_to_realloc'] = $obj_booking_dtl->getAvailableRoomsForReallocation($booked_v1['detail'][$kDtl]['date_from'], $booked_v1['detail'][$kDtl]['date_to'], 0, $booked_v1['id_hotel'], 1); $booking_data['rm_data'][$key_bk_data]['data']['booked'][$booked_k1]['detail'][$kDtl]['avail_rooms_to_swap'] = $obj_booking_dtl->getAvailableRoomsForSwapping($booked_v1['detail'][$kDtl]['date_from'], $booked_v1['detail'][$kDtl]['date_to'], $booked_v1['id_product'], $booked_v1['id_hotel'], $booked_v1['id_room']); } } @@ -790,9 +864,48 @@ class AdminHotelRoomsBookingController extends ModuleAdminController } } } + return $booking_data; } + public function ajaxProcessChangeRoomTypeToReallocate() + { + $result = array(); + $result['success'] = 0; + $result['has_price_changes'] = 0; + $result['has_room_type_change'] = 0; + + $idHotelBooking = Tools::getValue('id_htl_booking'); + $idNewRoomType = Tools::getValue('id_new_room_type'); + + // if room type id is present in the ajax request or not + if ($idNewRoomType) { + // validate the booking is valid or not + if (Validate::isLoadedObject($objHotelBooking = new HotelBookingDetail($idHotelBooking))) { + $result['success'] = 1; + // if room is changing in the reallocation + if ($objHotelBooking->id_product != $idNewRoomType) { + $result['has_room_type_change'] = 1; + $newRoomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( + $idNewRoomType, + $objHotelBooking->date_from, + $objHotelBooking->date_to + ); + if ($objHotelBooking->total_price_tax_excl != $newRoomTotalPrice['total_price_tax_excl']) { + $result['has_price_changes'] = 1; + $result['price_diff'] = $newRoomTotalPrice['total_price_tax_excl'] - $objHotelBooking->total_price_tax_excl; + } + } + } else { + $result['error'] = $this->l('Invalid booking information. Please try again.'); + } + } else { + $result['error'] = $this->l('Selected room type not found. Please try again.'); + } + + $this->ajaxDie(json_encode($result)); + } + public function setMedia() { parent::setMedia(); @@ -801,6 +914,13 @@ class AdminHotelRoomsBookingController extends ModuleAdminController if (Configuration::get('PS_BACKOFFICE_ROOM_BOOKING_TYPE') == HotelBookingDetail::PS_ROOM_UNIT_SELECTION_TYPE_OCCUPANCY) { $occupancyRequiredForBooking = true; } + if ($this->context->employee->isSuperAdmin()) { + $backOrderConfigKey = 'PS_BACKDATE_ORDER_SUPERADMIN'; + } else { + $backOrderConfigKey = 'PS_BACKDATE_ORDER_EMPLOYEES'; + } + $PS_BACKDATE_ORDER_ALLOW = (int)Configuration::get($backOrderConfigKey); + $jsVars = array( 'currency_prefix' => $currency->prefix, 'currency_suffix' => $currency->suffix, @@ -825,7 +945,6 @@ class AdminHotelRoomsBookingController extends ModuleAdminController 'add_to_cart' => $this->l('Add To Cart', null, true), 'remove' => $this->l('Remove', null, true), 'noRoomTypeAvlTxt' => $this->l('No room type available.', null, true), - 'no_rm_avail_txt' => $this->l('No rooms available.', null, true), 'slct_rm_err' => $this->l('Please select a room first.', null, true), 'product_added_cart_txt' => $this->l('Product added in cart', null, true), 'info_icon_path' => _MODULE_DIR_.$this->module->name.'/views/img/Slices/info-icon.svg', @@ -841,8 +960,19 @@ class AdminHotelRoomsBookingController extends ModuleAdminController 'below_txt' => $this->l('Below', null, true), 'years_txt' => $this->l('years', null, true), 'all_children_txt' => $this->l('All Children', null, true), + 'max_occupancy_reached_txt' => $this->l('Maximum room occupancy reached', null, true), + 'max_adults_txt' => $this->l('Maximum adult occupancy reached', null, true), + 'max_children_txt' => $this->l('Maximum children occupancy reached', null, true), + 'no_children_allowed_txt' => $this->l('Only adults can be accommodated', null, true), 'invalid_occupancy_txt' => $this->l('Invalid occupancy(adults/children) found.', null, true), + 'PS_BACKDATE_ORDER_ALLOW' => $PS_BACKDATE_ORDER_ALLOW, // 'check_calender_var' => $check_calender_var, + 'txtSomeErr' => $this->l('Some error occurred. Please try again.'), + 'no_rm_avail_txt' => $this->l('No room available.', null, true), + 'no_realloc_rm_avail_txt' => $this->l('No room available for reallocation.', null, true), + 'no_realloc_rm_type_avail_txt' => $this->l('No room type available for reallocation.', null, true), + 'no_swap_rm_avail_txt' => $this->l('No room available for swap.', null, true), + 'select_room_txt' => $this->l('Select room', null, true), ); if (Configuration::get('PS_BACKOFFICE_SEARCH_TYPE') == HotelBookingDetail::SEARCH_TYPE_OWS ) { $jsVars['is_occupancy_wise_search'] = true; diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelfeaturesController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelfeaturesController.php index 06dff1066..128df3ba4 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelfeaturesController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelfeaturesController.php @@ -61,7 +61,7 @@ class AdminHotelFeaturesController extends ModuleAdminController $smartyVars = array(); //lang vars $languages = Language::getLanguages(false); - $currentLangId = Configuration::get('PS_LANG_DEFAULT'); + $currentLangId = $this->default_form_language ? $this->default_form_language : Configuration::get('PS_LANG_DEFAULT'); $currentLang = Language::getLanguage((int) $currentLangId); $smartyVars['languages'] = $languages; $smartyVars['currentLang'] = $currentLang; diff --git a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php index 28c9b1ba6..f6eb2fb5f 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php @@ -80,7 +80,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController $this->identifier = 'id_order_return'; // START send access query information to the admin controller - $this->access_select = ' SELECT a.`id` FROM '._DB_PREFIX_.'order_return a'; + $this->access_select = ' SELECT a.`id_order_return` FROM '._DB_PREFIX_.'order_return a'; $this->access_join = ' INNER JOIN '._DB_PREFIX_.'htl_booking_detail hbd ON (hbd.id_order = a.id_order)'; if ($acsHtls = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 1)) { $this->access_where = ' WHERE hbd.id_hotel IN ('.implode(',', $acsHtls).')'; @@ -271,7 +271,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController } /*If Admin update the status of the order cancellation request*/ - if (Tools::isSubmit('submitRefundReqBookings')) { + if (Tools::isSubmit('submitRefundReqBookings') || Tools::isSubmit('submitRefundReqBookingsAndStay')) { $idOrderReturn = Tools::getValue('id_order_return'); $idsReturnDetail = Tools::getValue('id_order_return_detail'); if (Validate::isLoadedObject($objOrderReturn = new OrderReturn($idOrderReturn))) { @@ -292,27 +292,46 @@ class AdminOrderRefundRequestsController extends ModuleAdminController } else { $this->errors[] = $this->l('Invalid refund amount(s) entered.'); } - } else { - $this->errors[] = $this->l('Select at least one booking for refund.'); - } - if (Tools::isSubmit('refundTransactionAmount')) { - $paymentMode = Tools::getValue('payment_method'); - if (!$paymentMode) { - $paymentMode = Tools::getValue('other_payment_mode'); - if (!$paymentMode) { - $this->errors[] = $this->l('Please enter the payment mode of the refund transaction.'); - } elseif (!Validate::isGenericName($paymentMode)) { - $this->errors[] = $this->l('Invalid payment mode entered.'); + // If there are no errors in the refund amounts the check validations depends on refund amount + if (!count($this->errors)) { + $totalRefundAmount = array_sum($refundedAmounts); + if (Tools::isSubmit('generateCreditSlip')) { + if ($totalRefundAmount <= 0) { + $this->errors[] = $this->l('Invalid refund amount(s) for generating credit slip.'); + } + } + if (Tools::isSubmit('generateDiscount')) { + if ($totalRefundAmount <= 0) { + $this->errors[] = $this->l('Invalid refund amount(s) for generating voucher.'); + } + } + + if (Tools::isSubmit('refundTransactionAmount')) { + if ($totalRefundAmount <= 0) { + $this->errors[] = $this->l('Invalid refund amount(s) for entering refund transaction details.'); + } else { + $paymentMode = Tools::getValue('payment_method'); + if (!$paymentMode) { + $paymentMode = Tools::getValue('other_payment_mode'); + if (!$paymentMode) { + $this->errors[] = $this->l('Please enter the payment mode of the refund transaction.'); + } elseif (!Validate::isGenericName($paymentMode)) { + $this->errors[] = $this->l('Invalid payment mode entered.'); + } + } + + $idTransaction = Tools::getValue('id_transaction'); + if (!$idTransaction) { + $this->errors[] = $this->l('Please enter the transaction id of the refund transaction.'); + } elseif (!Validate::isGenericName($idTransaction)) { + $this->errors[] = $this->l('Invalid transaction id entered.'); + } + } } } - - $idTransaction = Tools::getValue('id_transaction'); - if (!$idTransaction) { - $this->errors[] = $this->l('Please enter the transaction id of the refund transaction.'); - } elseif (!Validate::isGenericName($idTransaction)) { - $this->errors[] = $this->l('Invalid transaction id entered.'); - } + } else { + $this->errors[] = $this->l('Select at least one booking for refund.'); } } } @@ -320,149 +339,60 @@ class AdminOrderRefundRequestsController extends ModuleAdminController $this->errors[] = $this->l('Invalid refund state.'); } } else { - $this->errors[] = $this->l('Invalid refund info.'); + $this->errors[] = $this->l('Invalid refund information found.'); } if (!count($this->errors)) { $bookingList = array(); $totalRefundedAmount = 0; - if ($objRefundState->refunded || $objRefundState->denied) { - $objHotelBookingDemands = new HotelBookingDemands(); - $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail(); + // If refund is completed then work on the booking list + if ($objRefundState->refunded) { foreach ($idsReturnDetail as $idRetDetail) { $objOrderReturnDetail = new OrderReturnDetail($idRetDetail); - // set booking as refunded if return state is refunded/denied $idHtlBooking = $objOrderReturnDetail->id_htl_booking; - $numDays = 1; - $idOrderDetail = 0; $reduction_amount = array( 'total_price_tax_excl' => 0, 'total_price_tax_incl' => 0, 'total_products_tax_excl' => 0, 'total_products_tax_incl' => 0, ); - if (Validate::isLoadedObject($objHtlBooking = new HotelBookingDetail($idHtlBooking))) { - $objHtlBooking->is_refunded = 1; + + $objHtlBooking = new HotelBookingDetail($idHtlBooking); + // perform booking refund processes in the booking tables + $objHtlBooking->processRefundInBookingTables(); + + // save individual booking amount for every booking refund + $refundedAmount = $refundedAmounts[$idRetDetail]; + $objOrderReturnDetail->refunded_amount = $refundedAmount; + $objOrderReturnDetail->save(); + + // sum the refund amount for total order refund amount + $totalRefundedAmount += $refundedAmount; + + if (Tools::isSubmit('generateCreditSlip')) { $numDays = $objHtlBooking->getNumberOfDays( $objHtlBooking->date_from, $objHtlBooking->date_to ); - if ((float) $orderTotalPaid <= 0) { - $reduction_amount['total_price_tax_excl'] = $objHtlBooking->total_price_tax_excl; - $reduction_amount['total_products_tax_excl'] = $objHtlBooking->total_price_tax_excl; - $reduction_amount['total_price_tax_incl'] = $objHtlBooking->total_price_tax_incl; - $reduction_amount['total_products_tax_incl'] = $objHtlBooking->total_price_tax_incl; - // reduce facilities amount from order and services_detail - if ($roomDemands = $objHotelBookingDemands->getRoomTypeBookingExtraDemands( - $objHtlBooking->id_order, - $objHtlBooking->id_product, - $objHtlBooking->id_room, - $objHtlBooking->date_from, - $objHtlBooking->date_to, - 0 - )) { - foreach ($roomDemands as $roomDemand) { - $objHotelBookingDemands = new HotelBookingDemands($roomDemand['id_booking_demand']); - $reduction_amount['total_price_tax_excl'] += $objHotelBookingDemands->total_price_tax_excl; - $reduction_amount['total_price_tax_incl'] += $objHotelBookingDemands->total_price_tax_incl; - $objHotelBookingDemands->total_price_tax_excl = 0; - $objHotelBookingDemands->total_price_tax_incl = 0; - $objHotelBookingDemands->save(); - } - } - - // reduce services amount from order and services_detail - if ($roomServices = $objRoomTypeServiceProductOrderDetail->getSelectedServicesForRoom( - $objHtlBooking->id - )) { - foreach ($roomServices['additional_services'] as $roomService) { - $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail( - $roomService['id_room_type_service_product_order_detail'] - ); - $reduction_amount['total_price_tax_excl'] += $objRoomTypeServiceProductOrderDetail->total_price_tax_excl; - $reduction_amount['total_products_tax_excl'] += $objRoomTypeServiceProductOrderDetail->total_price_tax_excl; - $reduction_amount['total_price_tax_incl'] += $objRoomTypeServiceProductOrderDetail->total_price_tax_incl; - $reduction_amount['total_products_tax_incl'] += $objRoomTypeServiceProductOrderDetail->total_price_tax_incl; - - if (Validate::isLoadedObject($objOrderDetail = new OrderDetail($objRoomTypeServiceProductOrderDetail->id_order_detail))) { - $objOrderDetail->product_quantity_refunded += $objRoomTypeServiceProductOrderDetail->quantity; - if ($objOrderDetail->product_quantity_refunded > $objOrderDetail->product_quantity) { - $objOrderDetail->product_quantity_refunded = $objOrderDetail->product_quantity; - } - - $objOrderDetail->total_price_tax_excl -= $objRoomTypeServiceProductOrderDetail->total_price_tax_excl; - $objOrderDetail->total_price_tax_incl -= $objRoomTypeServiceProductOrderDetail->total_price_tax_incl; - $objOrderDetail->save(); - } - - $objRoomTypeServiceProductOrderDetail->total_price_tax_excl = 0; - $objRoomTypeServiceProductOrderDetail->total_price_tax_incl = 0; - $objRoomTypeServiceProductOrderDetail->save(); - } - } - - } - - // enter refunded quantity in the order detail table + $objHtlBooking = new HotelBookingDetail($idHtlBooking); $idOrderDetail = $objHtlBooking->id_order_detail; - if (Validate::isLoadedObject($objOrderDetail = new OrderDetail($idOrderDetail))) { - $objOrderDetail->product_quantity_refunded += $numDays; - if ($objOrderDetail->product_quantity_refunded > $objOrderDetail->product_quantity) { - $objOrderDetail->product_quantity_refunded = $objOrderDetail->product_quantity; - } - if ((float) $orderTotalPaid <= 0) { - // reduce room amount from order and order detail - $objOrderDetail->total_price_tax_incl -= $objHtlBooking->total_price_tax_incl; - $objOrderDetail->total_price_tax_excl -= $objHtlBooking->total_price_tax_excl; - if (Validate::isLoadedObject($objOrder = new Order($objHtlBooking->id_order))) { - $objOrder->total_paid -= $reduction_amount['total_price_tax_incl']; - $objOrder->total_paid_tax_excl -= $reduction_amount['total_price_tax_excl']; - $objOrder->total_paid_tax_incl -= $reduction_amount['total_price_tax_incl']; - $objOrder->total_products -= $reduction_amount['total_products_tax_excl']; - $objOrder->total_products_wt -= $reduction_amount['total_products_tax_incl']; - $objOrder->save(); - } - } - $objOrderDetail->save(); - } - if ((float) $orderTotalPaid <= 0) { - // reduce room amount from htl_booking_detail - $objHtlBooking->is_cancelled = 1; - $objHtlBooking->total_price_tax_excl = 0; - $objHtlBooking->total_price_tax_incl = 0; - } - $objHtlBooking->save(); + $bookingList[$idHtlBooking] = array( + 'id_htl_booking' => $idHtlBooking, + 'id_order_detail' => $idOrderDetail, + 'quantity' => $numDays, + 'num_days' => $numDays, + 'unit_price' => $refundedAmount / $numDays, + 'amount' => $refundedAmount, + ); } - - // save individual booking amount for every booking refund - if ($objRefundState->refunded) { - $refundedAmount = $refundedAmounts[$idRetDetail]; - $objOrderReturnDetail->refunded_amount = $refundedAmount; - $objOrderReturnDetail->save(); - - // sum the refund amount for total order refund amount - $totalRefundedAmount += $refundedAmount; - - if (Tools::isSubmit('generateCreditSlip')) { - $bookingList[$idHtlBooking] = array( - 'id_htl_booking' => $idHtlBooking, - 'id_order_detail' => $idOrderDetail, - 'quantity' => $numDays, - 'num_days' => $numDays, - 'unit_price' => $refundedAmount / $numDays, - 'amount' => $refundedAmount, - ); - } - } - } // if bookings are refunded then set the payment information - if ($objRefundState->refunded && (float) $orderTotalPaid > 0) { + if ((float) $orderTotalPaid > 0) { if (Tools::isSubmit('refundTransactionAmount')) { $objOrderReturn->payment_mode = $paymentMode; $objOrderReturn->id_transaction = $idTransaction; @@ -480,18 +410,20 @@ class AdminOrderRefundRequestsController extends ModuleAdminController // change state of the order refund $objOrderReturn->changeIdOrderReturnState($idRefundState); + // change state of the order to refunded if all the room bookings in the order are completely refunded if ($objRefundState->refunded) { - // check if order is paid the set status of the order to refunded - $objOrderHistory = new OrderHistory(); - $objOrderHistory->id_order = (int)$objOrder->id; + $idOrderState = 0; + if ($objOrder->hasCompletelyRefunded(Order::ORDER_COMPLETE_REFUND_FLAG)) { + $idOrderState = Configuration::get('PS_OS_REFUND'); + } elseif ($objOrder->hasCompletelyRefunded(Order::ORDER_COMPLETE_REFUND_FLAG)) { + $idOrderState = Configuration::get('PS_OS_CANCELED'); + } - if ($objOrder->hasCompletelyRefunded(OrderReturnState::ORDER_RETURN_STATE_FLAG_REFUNDED)) { - $idOrderState = null; - if ((float) $orderTotalPaid) { - $idOrderState = Configuration::get('PS_OS_REFUND'); - } else { - $idOrderState = Configuration::get('PS_OS_CANCELED'); - } + // If order is completely refunded or cancelled then change the order state + if ($idOrderState) { + // check if order is paid the set status of the order to refunded + $objOrderHistory = new OrderHistory(); + $objOrderHistory->id_order = (int)$objOrder->id; $useExistingPayment = false; if (!$objOrder->hasInvoice()) { @@ -611,10 +543,18 @@ class AdminOrderRefundRequestsController extends ModuleAdminController } elseif ($objRefundState->refunded) { $confirmation = 102; } - Tools::redirectAdmin( - self::$currentIndex.'&conf='.$confirmation.'&id_order_return='.$idOrderReturn. - '&vieworder_return&token='.$this->token - ); + + if (Tools::isSubmit('submitRefundReqBookingsAndStay')) { + Tools::redirectAdmin( + self::$currentIndex.'&conf='.$confirmation.'&id_order_return='.$idOrderReturn. + '&vieworder_return&token='.$this->token + ); + } else { + Tools::redirectAdmin( + self::$currentIndex.'&conf='.$confirmation.'&id_order='.$objOrder->id. + '&id_order_return='.$idOrderReturn.'&vieworder_return&token='.$this->token + ); + } } } diff --git a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php index ffcf6ec19..588444904 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php @@ -152,7 +152,7 @@ class AdminOrderRefundRulesController extends ModuleAdminController } //lang vars - $currentLangId = Configuration::get('PS_LANG_DEFAULT'); + $currentLangId = $this->default_form_language ? $this->default_form_language : Configuration::get('PS_LANG_DEFAULT'); $smartyVars['languages'] = Language::getLanguages(false); $smartyVars['currentLang'] = Language::getLanguage((int) $currentLangId); @@ -213,10 +213,10 @@ class AdminOrderRefundRulesController extends ModuleAdminController if ($paymentType == '') { $this->errors[] = $this->l('Invalid payment type.'); } - if (!$fullPayAmount) { + if (!$fullPayAmount && floatval($fullPayAmount) != 0) { $this->errors[] = $this->l('Enter deduction value for full payment.'); } - if (!$advPayAmount) { + if (!$advPayAmount && floatval($advPayAmount) != 0) { $this->errors[] = $this->l('Enter deduction value for advance payment.'); } @@ -244,14 +244,6 @@ class AdminOrderRefundRulesController extends ModuleAdminController $this->errors[] = $this->l('Enter number of days before check-in date for this rule to be applicable.'); } else if (!Validate::isUnsignedInt($cancelationDays)) { $this->errors[] = $this->l('Enter valid number of days.'); - } else if ($objRefundRule->checkIfRuleExistsByCancelationdays($cancelationDays)) { - if ($idRefundRule) { - if ($objRefundRule->days != $cancelationDays) { - $this->errors[] = $this->l('Refund rule for ').$cancelationDays.$this->l(' days already exists.'); - } - } else { - $this->errors[] = $this->l('Refund rule for ').$cancelationDays.$this->l(' days already exists.'); - } } if (!count($this->errors)) { diff --git a/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php b/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php index b6dcb8650..72e2f61e9 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php @@ -151,7 +151,7 @@ class AdminRoomTypeGlobalDemandController extends ModuleAdminController $smartyVars = array(); $objCurrency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); $smartyVars['defaultcurrencySign'] = $objCurrency->sign; - $currentLangId = Configuration::get('PS_LANG_DEFAULT'); + $currentLangId = $this->default_form_language ? $this->default_form_language : Configuration::get('PS_LANG_DEFAULT'); $languages = Language::getLanguages(false); $smartyVars['languages'] = $languages; $currentLang = Language::getLanguage((int) $currentLangId); diff --git a/modules/hotelreservationsystem/hotelreservationsystem.php b/modules/hotelreservationsystem/hotelreservationsystem.php index e1240de49..bf6473245 100644 --- a/modules/hotelreservationsystem/hotelreservationsystem.php +++ b/modules/hotelreservationsystem/hotelreservationsystem.php @@ -76,24 +76,8 @@ class HotelReservationSystem extends Module if (!Configuration::get('PS_CATALOG_MODE')) { /*To remove room from cart before todays date*/ if (isset($this->context->cart->id) && $this->context->cart->id) { - $htlCart = new HotelCartBookingData(); - if ($cartBookingData = $htlCart->getCartBookingDetailsByIdCartIdGuest( - $this->context->cart->id, - $this->context->cart->id_guest, - $this->context->language->id - )) { - foreach ($cartBookingData as $cartRoom) { - if (strtotime($cartRoom['date_from']) < strtotime(date('Y-m-d'))) { - $htlCart->deleteRoomDataFromOrderLine( - $cartRoom['id_cart'], - $cartRoom['id_guest'], - $cartRoom['id_product'], - $cartRoom['date_from'], - $cartRoom['date_to'] - ); - } - } - } + $objHotelCartBookingData = new HotelCartBookingData(); + $objHotelCartBookingData->removeBackdateRoomsFromCart($this->context->cart->id); } } //End @@ -101,6 +85,36 @@ class HotelReservationSystem extends Module $this->context->controller->addJS($this->_path.'/views/js/HotelReservationFront.js'); } + public function hookActionFrontControllerSetMedia() + { + if (Configuration::get('WK_CUSTOMER_SUPPORT_PHONE_NUMBER') != '' + || Configuration::get('WK_CUSTOMER_SUPPORT_EMAIL') != '' + ) { + $this->context->controller->addCSS($this->getPathUri().'views/css/hook/display-nav.css'); + } + + } + + public function hookDisplayNav() + { + $this->smarty->assign(array( + 'phone' => Configuration::get('WK_CUSTOMER_SUPPORT_PHONE_NUMBER'), + 'email' => Configuration::get('WK_CUSTOMER_SUPPORT_EMAIL'), + )); + + return $this->display(__FILE__, 'display-nav.tpl'); + } + + public function hookDisplayExternalNavigationHook() + { + $this->smarty->assign(array( + 'phone' => Configuration::get('WK_CUSTOMER_SUPPORT_PHONE_NUMBER'), + 'email' => Configuration::get('WK_CUSTOMER_SUPPORT_EMAIL'), + )); + + return $this->display(__FILE__, 'external-navigation-hook.tpl'); + } + public function cartBookingDataForMail($order) { $result = array(); @@ -550,9 +564,9 @@ class HotelReservationSystem extends Module ); // Controllers without tabs - $this->installTab('AdminHotelGeneralSettings', 'Hotel General configuration', false, false); - $this->installTab('AdminHotelFeaturePricesSettings', 'Advanced Price Rules', false, false); - $this->installTab('AdminRoomTypeGlobalDemand', 'Additional Demand Configuration', false, false); + $this->installTab('AdminHotelGeneralSettings', 'Hotel General Configuration', 'AdminHotelConfigurationSetting', false); + $this->installTab('AdminHotelFeaturePricesSettings', 'Advanced Price Rules', 'AdminHotelConfigurationSetting', false); + $this->installTab('AdminRoomTypeGlobalDemand', 'Additional Demand Configuration', 'AdminHotelConfigurationSetting', false); $this->installTab('AdminAssignHotelFeatures', 'Assign Hotel Features', false, false); $this->installTab('AdminBookingDocument', 'Booking Documents', false, false); @@ -635,6 +649,9 @@ class HotelReservationSystem extends Module 'actionOrderStatusPostUpdate', 'displayLeftColumn', 'actionCartSummary', + 'actionFrontControllerSetMedia', + 'displayNav', + 'displayExternalNavigationHook', ) ); } @@ -669,7 +686,9 @@ class HotelReservationSystem extends Module 'WK_ADVANCED_PAYMENT_INC_TAX', 'WK_GOOGLE_ACTIVE_MAP', 'WK_MAP_HOTEL_ACTIVE_ONLY', - 'WK_HOTEL_NAME_ENABLE' + 'WK_HOTEL_NAME_ENABLE', + 'WK_CUSTOMER_SUPPORT_PHONE_NUMBER', + 'WK_CUSTOMER_SUPPORT_EMAIL', ); foreach ($configKeys as $key) { if (!Configuration::deleteByName($key)) { diff --git a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css index 028ce74c1..ce44c95c6 100644 --- a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css +++ b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css @@ -472,10 +472,32 @@ p.room_cat_data border-color: #4d90fe; } +.gm-style-iw-d h6 { + font-family: unset; + font-size: 14px; + color: #333; + font-weight: 500; + margin: 0; +} + +.gm-style-iw-d p { + font-family: unset; + font-size: 13px; + color: #333; + font-weight: 400; + margin: 0; +} + /* ==== AdminHotelFeaturePricesSettingsController ==== */ .week_days { display: none; } +.week_days .checkboxes-wrap { + display: flex; +} +.week_days .checkboxes-wrap .day-wrap { + min-width: 50px; +} .room_type_search_results_ul { padding: 0px; background: #ffffff none repeat scroll 0 0; diff --git a/modules/hotelreservationsystem/views/css/admin/css/hotel_admin_tab_logo.css b/modules/hotelreservationsystem/views/css/admin/css/hotel_admin_tab_logo.css index af28282e4..57fe733bf 100644 --- a/modules/hotelreservationsystem/views/css/admin/css/hotel_admin_tab_logo.css +++ b/modules/hotelreservationsystem/views/css/admin/css/hotel_admin_tab_logo.css @@ -1,4 +1,23 @@ -.icon-AdminHotelReservationSystemManagement:before { - content: ""; - font-family: FontAwesome -} \ No newline at end of file +/** + * 2010-2023 Webkul. + * + * NOTICE OF LICENSE + * + * All right is reserved, + * Please go through LICENSE.txt file inside our module + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade this module to newer + * versions in the future. If you wish to customize this module for your + * needs please refer to CustomizationPolicy.txt file inside our module for more information. + * + * @author Webkul IN + * @copyright 2010-2023 Webkul IN + * @license LICENSE.txt + */ + +.icon-AdminHotelReservationSystemManagement::before { + content: '\f236'; + font-family: 'FontAwesome' +} diff --git a/modules/qloblockcontact/views/css/hook/display-nav.css b/modules/hotelreservationsystem/views/css/hook/display-nav.css similarity index 100% rename from modules/qloblockcontact/views/css/hook/display-nav.css rename to modules/hotelreservationsystem/views/css/hook/display-nav.css diff --git a/modules/hotelreservationsystem/views/css/hook/index.php b/modules/hotelreservationsystem/views/css/hook/index.php new file mode 100644 index 000000000..257bc22f9 --- /dev/null +++ b/modules/hotelreservationsystem/views/css/hook/index.php @@ -0,0 +1,29 @@ +
      ' + place.name + '

      ' + + results[0].formatted_address + '

      '; + + var callback = function (latLng) { + that.setFormVars({ + lat: latLng.lat(), + lng: latLng.lng(), + formattedAddress: content, + inputText: $('#pac-input').val(), + }); + } + + that.addMarker( + latLng, + results[0], + null, + isInfoWindowNeeded, + callback(latLng) + ); + } + }); + } + }); + } else { + that.geocoder.geocode({ location: latLng }, function (results, status) { + if (status == google.maps.GeocoderStatus.OK && results[0]) { + var request = { + placeId: results[0].place_id, + fields: ['name'], + }; + + that.placesService.getDetails(request, function(place, status) { + if (status === google.maps.places.PlacesServiceStatus.OK) { + var content = '
      ' + place.name + '

      ' + + results[0].formatted_address + '

      '; + + var callback = function (latLng) { + that.setFormVars({ + lat: latLng.lat(), + lng: latLng.lng(), + formattedAddress: content, + inputText: $('#pac-input').val(), + }); + } + + that.addMarker( + latLng, + results[0], + null, + isInfoWindowNeeded, + callback(latLng) + ); + } + }); + } + }); + } }); if(cb && typeof cb === 'function') { cb(); @@ -122,7 +190,7 @@ var GoogleMapsManager = { }; that.addMarker(latLng, place); - var content = '
      ' + place.name + '
      ' + place.formatted_address; + var content = '
      ' + place.name + '

      ' + place.formatted_address + '

      '; that.setFormVars({ lat: latLng.lat, lng: latLng.lng, @@ -142,7 +210,7 @@ var GoogleMapsManager = { } }); }, - addMarker: function(latLng, address = null, fa = null, cb = null) { + addMarker: function(latLng, address = null, fa = null, addInfoWindow = true, cb = null) { var that = this; that.clearAllMarkers(); var marker = new google.maps.Marker({ @@ -163,23 +231,36 @@ var GoogleMapsManager = { }); }); - if (address === null && fa) { - // open info window - that.addInfoWindow(marker, fa); + if (addInfoWindow) { + if (address === null && fa) { + // open info window + that.addInfoWindow(marker, fa); + } else { + var request = { + placeId: address.place_id, + fields: ['name'], + }; + + that.placesService.getDetails(request, function(place, status) { + if (status === google.maps.places.PlacesServiceStatus.OK) { + // open info window + var content = '
      ' + place.name + '

      ' + address.formatted_address + '

      '; + that.addInfoWindow(marker, content); + + if(cb && typeof cb === 'function') { + cb(); + } + } + }); + } } else { - var request = { - placeId: address.place_id, - fields: ['name'], - }; - that.placesService.getDetails(request, function(place, status) { - if (status === google.maps.places.PlacesServiceStatus.OK) { - // open info window - var content = '
      ' + place.name + '
      ' + - address.formatted_address + '
      '; - that.addInfoWindow(marker, content); - } - }); + if(cb && typeof cb === 'function') { + cb(); + } + + return marker; } + }, clearAllMarkers: function() { for (var i = 0; i < this.markers.length; i++) { @@ -190,13 +271,21 @@ var GoogleMapsManager = { addInfoWindow: function(marker, content) { if (typeof google === 'object') { var that = this; + var infoWindow = new google.maps.InfoWindow({ content: content, + maxWidth: 200, }); + infoWindow.open({ anchor: marker, map: that.map }); + + google.maps.event.addListener(infoWindow, 'closeclick', function () { + that.clearAllMarkers(); + }); + var latLng = marker.getPosition(); that.setFormVars({ lat: latLng.lat(), @@ -214,10 +303,15 @@ var GoogleMapsManager = { }, } +$(document).on('click', 'button.gm-ui-hover-effect', function () { + GoogleMapsManager.clearAllMarkers(); +}); + function initGoogleMaps() { if (typeof enabledDisplayMap != 'undefined' - && typeof google === 'object' && $('#googleMapContainer').length + && typeof google == 'object' + && typeof google.maps == 'object' ) { GoogleMapsManager.init($('#map')); GoogleMapsManager.initMap(); @@ -290,9 +384,9 @@ $(document).ready(function() { url: statebycountryurl, success: function(data) { var html = ""; - if (data) { - $.each(data, function(index, value) { - html += ""; + if (data.status && data.states.length) { + $.each(data.states, function(index, value) { + html += ""; }); } $('#hotel_state').append(html); @@ -486,8 +580,8 @@ $(document).ready(function() { }); - $(".is_special_days_exists").on ('click', function() { - if ($(this).is(':checked')) { + $('[name="is_special_days_exists"]').on('change', function() { + if (parseInt($('[name="is_special_days_exists"]:checked').val())) { $('.week_days').show(200); } else { $('.week_days').hide(200); @@ -579,10 +673,10 @@ $(document).ready(function() { return highlightDateBorder($("#feature_plan_date_from").val(), date); }, onSelect: function(selectedDate) { - var date_format = selectedDate.split("-"); - var selectedDate = new Date(date_format[2], date_format[1] - 1, date_format[0]); - selectedDate.setDate(selectedDate.getDate() + 1); - $("#feature_plan_date_to").datepicker("option", "minDate", selectedDate); + let objDateToMin = $.datepicker.parseDate('dd-mm-yy', selectedDate); + objDateToMin.setDate(objDateToMin.getDate() + 1); + + $('#feature_plan_date_to').datepicker('option', 'minDate', objDateToMin); }, }); @@ -595,47 +689,30 @@ $(document).ready(function() { $("#feature_plan_date_to").datepicker({ showOtherMonths: true, dateFormat: 'dd-mm-yy', - beforeShow: function (input, instance) { - var date_to = $('#feature_plan_date_from').val(); - if (typeof date_to != 'undefined' && date_to != '') { - var date_format = date_to.split("-"); - var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[2], date_format[1] - 1, date_format[0]))); - selectedDate.setDate(selectedDate.getDate()+1); - $("#feature_plan_date_to").datepicker("option", "minDate", selectedDate); + beforeShow: function () { + let dateFrom = $('#feature_plan_date_from').val(); + + let objDateToMin = null; + if (typeof dateFrom != 'undefined' && dateFrom != '') { + objDateToMin = $.datepicker.parseDate('dd-mm-yy', dateFrom); } else { - var date_format = new Date(); - var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date())); - selectedDate.setDate(selectedDate.getDate()+1); - $("#feature_plan_date_to").datepicker("option", "minDate", selectedDate); + objDateToMin = new Date(); } + + objDateToMin.setDate(objDateToMin.getDate() + 1); + $('#feature_plan_date_to').datepicker('option', 'minDate', objDateToMin); }, //for calender Css beforeShowDay: function (date) { return highlightDateBorder($("#feature_plan_date_to").val(), date); - }, - onSelect: function(selectedDate) { - var date_format = selectedDate.split("-"); - var selectedDate = new Date(date_format[2], date_format[1] - 1, date_format[0]); - selectedDate.setDate(selectedDate.getDate() - 1); - $("#feature_plan_date_from").datepicker("option", "maxDate", selectedDate); } }); function highlightDateBorder(elementVal, date) { if (elementVal) { - var currentDate = date.getDate(); - var currentMonth = date.getMonth()+1; - if (currentMonth < 10) { - currentMonth = '0' + currentMonth; - } - if (currentDate < 10) { - currentDate = '0' + currentDate; - } - dmy = date.getFullYear() + "-" + currentMonth + "-" + currentDate; - var date_format = elementVal.split("-"); - var check_in_time = (date_format[2]) + '-' + (date_format[1]) + '-' + (date_format[0]); - if (dmy == check_in_time) { + let selectedDate = $.datepicker.formatDate('dd-mm-yy', date); + if (selectedDate == elementVal) { return [true, "selectedCheckedDate", "Check-In date"]; } else { return [true, ""]; @@ -767,6 +844,13 @@ function showLangField(select_lang_name, id_lang) $('.all_lang_icon').attr('src', img_dir_l+id_lang+'.jpg'); $('#choosedLangId').val(id_lang); + + var id_old_language = id_language; + id_language = id_lang; + + if (id_old_language != id_lang) { + changeEmployeeLanguage(); + } } /* ---- HotelConfigurationSettingController Admin ---- */ diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js index d02a0b756..4e6390085 100644 --- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js +++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js @@ -28,6 +28,8 @@ $(document).ready(function() { url: rooms_booking_url, method: 'POST', extraParams: function() { + removeInitializedTooltips(); + return $.extend( { ajax: true, @@ -183,6 +185,14 @@ $(document).ready(function() { calendar.render(); } + function removeInitializedTooltips() { + $('#fullcalendar a.day-info, #fullcalendar .fc-daygrid-event').each(function () { + if ($(this).data('ui-tooltip')) { + $(this).tooltip('destroy'); + } + }); + } + function getSearchData() { return { @@ -220,14 +230,15 @@ $(document).ready(function() { dateFormat: 'dd-mm-yy', altFormat: 'yy-mm-dd', altField: '#date_from', + minDate: PS_BACKDATE_ORDER_ALLOW == 1 ? null : 0, beforeShowDay: function (date) { return highlightDateBorder($("#from_date").val(), date); }, onSelect: function(selectedDate) { - var date_format = selectedDate.split("-"); - var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[2], date_format[1] - 1, date_format[0]))); - selectedDate.setDate(selectedDate.getDate() + 1); - $("#to_date").datepicker("option", "minDate", selectedDate); + let objDateToMin = $.datepicker.parseDate('dd-mm-yy', selectedDate); + objDateToMin.setDate(objDateToMin.getDate() + 1); + + $('#to_date').datepicker('option', 'minDate', objDateToMin); }, }); @@ -236,6 +247,11 @@ $(document).ready(function() { dateFormat: 'dd-mm-yy', altFormat: 'yy-mm-dd', altField: '#date_to', + beforeShow: function () { + from_date = $.datepicker.parseDate('dd-mm-yy', $("#from_date").val()); + from_date.setDate(from_date.getDate() + 1); + $("#to_date").datepicker("option", "minDate", from_date); + }, beforeShowDay: function (date) { return highlightDateBorder($("#to_date").val(), date); }, @@ -401,7 +417,7 @@ $(document).ready(function() { var date_to = $(this).attr('data-date-to'); var sub_key = $(this).attr('data-sub-key'); - var booking_type = $("input[name='bk_type_" + id_room + "_" + sub_key + "']:checked").val(); + var booking_type = $(this).closest('tr').find("input.par_bk_type:checked").val(); var comment = $("#comment_" + id_room + "_" + sub_key).val(); var btn = $(this); $(this).closest('tr').find('.booking_occupancy_wrapper').parent().removeClass('open'); @@ -587,55 +603,91 @@ $(document).ready(function() { }); $(document).on('change', '.num_occupancy', function(e) { - + let elementVal = parseInt($(this).val()); let current_room_occupancy = 0; $(this).closest('.occupancy_info_block').find('.num_occupancy').each(function(){ current_room_occupancy += parseInt($(this).val()); }); let max_guests_in_room = $(this).closest(".booking_occupancy_wrapper").find('.max_guests').val(); let max_allowed_for_current = (max_guests_in_room - current_room_occupancy) + parseInt($(this).val()); - if ($(this).val() > $(this).attr('max')) { - $(this).val($(this).attr('max')); - } - if ($(this).val() > max_allowed_for_current) { - $(this).val(max_allowed_for_current); - } - + let haserror = false if ($(this).hasClass('num_children')) { - let totalChilds = $(this).closest('.occupancy_info_block').find('.guest_child_age').length; - if (totalChilds < $(this).val()) { - $(this).closest('.occupancy_info_block').find('.children_age_info_block').show(); - while ($(this).closest('.occupancy_info_block').find('.guest_child_age').length < $(this).val()) { - var roomBlockIndex = parseInt($(this).closest('.occupancy_info_block').attr('occ_block_index')); - var childAgeSelect = '
      '; - childAgeSelect += ''; - childAgeSelect += '
      '; - $(this).closest('.occupancy_info_block').find('.children_ages').append(childAgeSelect); + max_child_in_room = $(this).closest(".booking_occupancy_wrapper").find('.max_children').val(); + if (elementVal > max_child_in_room) { + $(this).val(max_child_in_room); + if (elementVal == 1) { + showOccupancyError(no_children_allowed_txt, $(this).closest(".occupancy_info_block")); + haserror = true; + } else { + showOccupancyError(max_children_txt, $(this).closest(".occupancy_info_block")); + haserror = true; } - } else { - let child = $(this).val(); - $(this).closest('.occupancy_info_block').find('.guest_child_age').each(function(ind, element) { - if (child <= ind) { - $(element).parent().remove(); - } - }); - if (child == 0) { - $(this).closest('.occupancy_info_block').find('.children_age_info_block').hide(); - } - + } else if (elementVal > max_allowed_for_current) { + $(this).val(max_allowed_for_current); + showOccupancyError(max_occupancy_reached_txt, $(this).closest(".occupancy_info_block")); + haserror = true; + } + } else { + max_adults_in_room = $(this).closest(".booking_occupancy_wrapper").find('.max_adults').val(); + if (elementVal >= max_adults_in_room) { + $(this).val(max_adults_in_room); + showOccupancyError(max_adults_txt, $(this).closest(".occupancy_info_block")); + haserror = true; + } else if (elementVal > max_allowed_for_current) { + $(this).val(max_allowed_for_current); + showOccupancyError(max_occupancy_reached_txt, $(this).closest(".occupancy_info_block")); + haserror = true; } } - setRoomTypeGuestOccupancy($(this).closest('.booking_occupancy_wrapper')); + if (!haserror) { + if ($(this).hasClass('num_children')) { + let totalChilds = $(this).closest('.occupancy_info_block').find('.guest_child_age').length; + if (totalChilds < $(this).val()) { + $(this).closest('.occupancy_info_block').find('.children_age_info_block').show(); + while ($(this).closest('.occupancy_info_block').find('.guest_child_age').length < $(this).val()) { + var roomBlockIndex = parseInt($(this).closest('.occupancy_info_block').attr('occ_block_index')); + var childAgeSelect = '
      '; + childAgeSelect += ''; + childAgeSelect += '
      '; + $(this).closest('.occupancy_info_block').find('.children_ages').append(childAgeSelect); + } + } else { + let child = $(this).val(); + $(this).closest('.occupancy_info_block').find('.guest_child_age').each(function(ind, element) { + if (child <= ind) { + $(element).parent().remove(); + } + }); + if (child == 0) { + $(this).closest('.occupancy_info_block').find('.children_age_info_block').hide(); + } + } + } + } + setRoomTypeGuestOccupancy($(this).closest('.booking_occupancy_wrapper')); }); + var errorMsgTime; + $('.occupancy-input-errors').parent().hide(); + function showOccupancyError(msg, occupancy_info_block) + { + var errorMsgBlock = $(occupancy_info_block).find('.occupancy-input-errors') + $(errorMsgBlock).html(msg).parent().show('fast'); + clearTimeout(errorMsgTime); + errorMsgTime = setTimeout(function() { + $(errorMsgBlock).parent().hide('fast'); + }, 1000); + } + + $(document).on('click', '.booking_guest_occupancy', function(e) { $(this).parent().toggleClass('open'); }); @@ -869,6 +921,12 @@ $(document).ready(function() { $("#cartModal").html(result.cart_content); } $("#cart_record").html(result.total_products_in_cart); + + if (parseInt(result.total_products_in_cart) > 0) { + $('#cart_record').closest('button').removeClass('disabled'); + } else { + $('#cart_record').closest('button').addClass('disabled'); + } } } }); @@ -907,27 +965,24 @@ $(document).ready(function() { }; initBookingList(); function initBookingList() { - $('.avai_comment, .par_comment').hide(); + $('.booking_type_comment').hide(); $('.avai_bk_type').on('change', function() { - var id_room = $(this).attr('data-id-room'); var booking_type = $(this).val(); if (booking_type == allotmentTypes.auto) { - $('#comment_'+id_room).hide().val(''); + $(this).closest('td').find('.booking_type_comment').hide().val(''); } else if (booking_type == allotmentTypes.manual) { - $('#comment_'+id_room).show(); + $(this).closest('td').find('.booking_type_comment').show(); } }); $('.par_bk_type').on('change', function() { - var id_room = $(this).attr('data-id-room'); - var sub_key = $(this).attr('data-sub-key'); var booking_type = $(this).val(); if (booking_type == allotmentTypes.auto) { - $('#comment_'+id_room+'_'+sub_key).hide().val(''); + $(this).closest('td').find('.booking_type_comment').hide().val(''); } else if (booking_type == allotmentTypes.manual) { - $('#comment_'+id_room+'_'+sub_key).show(); + $(this).closest('td').find('.booking_type_comment').show(); } }); } @@ -935,18 +990,8 @@ $(document).ready(function() { function highlightDateBorder(elementVal, date) { if (elementVal) { - var currentDate = date.getDate(); - var currentMonth = date.getMonth()+1; - if (currentMonth < 10) { - currentMonth = '0' + currentMonth; - } - if (currentDate < 10) { - currentDate = '0' + currentDate; - } - dmy = date.getFullYear() + "-" + currentMonth + "-" + currentDate; - var date_format = elementVal.split("-"); - var check_in_time = (date_format[2]) + '-' + (date_format[1]) + '-' + (date_format[0]); - if (dmy == check_in_time) { + let selectedDate = $.datepicker.formatDate('dd-mm-yy', date); + if (selectedDate == elementVal) { return [true, "selectedCheckedDate", "Check-In date"]; } else { return [true, ""]; @@ -956,60 +1001,179 @@ $(document).ready(function() { } } - /*For swaping rooms in the modal*/ - $("#realloc_allocated_rooms").on('click', function(e) { + $('#mySwappigModal').on('hidden.bs.modal', function (e) { + $(".modal_curr_room_num").val(''); + $(".modal_id_htl_booking").val(''); + $("#reallocation_price_diff_block .order_currency_sign").html(''); + $(".cust_name").text(''); + $(".cust_email").text(''); + $(".swp_rm_opts").remove(); + $(".realloc_rm_type_opts").remove(); + $(".realloc_rm_opts").remove(); + }); + + $('#mySwappigModal').on('shown.bs.modal', function (e) + { + $(".loading_overlay").show(); + + $(".modal_id_htl_booking").val(e.relatedTarget.dataset.id_htl_booking); + $("#reallocation_price_diff_block .order_currency_sign").html(e.relatedTarget.dataset.currency_sign); + $(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num + ', ' + e.relatedTarget.dataset.room_type_name); + $(".cust_name").text(e.relatedTarget.dataset.cust_name); + $(".cust_email").text(e.relatedTarget.dataset.cust_email); + + // reset price difference fields + $("#reallocation_price_diff").val(0); + $("#reallocation_price_diff_block").hide(); + $(".realloc_roomtype_change_message").hide(); + + // For Rooms Swapping + var json_arr_rm_swp = JSON.parse(e.relatedTarget.dataset.avail_rm_swap); + if (e.relatedTarget.dataset.avail_rm_swap != 'false' && json_arr_rm_swp.length != 0) { + html = ''; + + $("#swap_allocated_rooms").removeAttr('disabled'); + $(".swap_avail_rooms_container").empty().append(html); + } else { + $(".swap_avail_rooms_container").empty().text(no_swap_rm_avail_txt).addClass('text-danger'); + $("#swap_allocated_rooms").attr('disabled', 'disabled'); + } + + // For Rooms Reallocation + var json_arr_realloc_room_types = JSON.parse(e.relatedTarget.dataset.avail_realloc_room_types); + if (e.relatedTarget.dataset.avail_realloc_room_types != 'false' && json_arr_realloc_room_types.length != 0) { + var idCurrentRoomType = e.relatedTarget.dataset.id_room_type; + var roomsTypesHtml = ''; + + setRoomsForReallocation(json_arr_realloc_room_types[idCurrentRoomType]['rooms']); + + $("#realloc_allocated_rooms").removeAttr('disabled'); + $(".realloc_avail_room_type_container").empty().append(roomsTypesHtml); + } else { + $(".realloc_avail_rooms_container").empty().text(no_realloc_rm_avail_txt).addClass('text-danger'); + $(".realloc_avail_room_type_container").empty().text(no_realloc_rm_type_avail_txt).addClass('text-danger'); + $("#realloc_allocated_rooms").attr('disabled', 'disabled'); + } + + $(".loading_overlay").hide(); + }); + + // change room type for reallocation + $(document).on("change", "#realloc_avail_room_type", function(e) { + $(".loading_overlay").show(); + + var idHotelBooking = $(this).data('id_htl_booking'); + $("#reallocation_price_diff").val(0); + $("#reallocation_price_diff_block").hide(); + if (parseInt(idHotelBooking) > 0) { + var optionSelected = $(this).find('option:selected'); + var roomsAvailable = JSON.parse(optionSelected.attr('rooms_available')); + + // set the rooms of the selceted room type + setRoomsForReallocation(roomsAvailable); + + // send an ajax for fetching if price has changes in the new room type seleceted + $.ajax({ + type: 'POST', + headers: { + "cache-control": "no-cache" + }, + url: rooms_booking_url, + dataType: 'JSON', + cache: false, + data: { + id_htl_booking: idHotelBooking, + id_new_room_type: $(this).val(), + action: 'changeRoomTypeToReallocate', + ajax: true + }, + success: function(result) { + if (result.success == 1) { + // has room type changed for reallocation + if (result.has_room_type_change == 1) { + $(".realloc_roomtype_change_message").show(); + // has room type price changed for reallocation + if (result.has_price_changes == 1) { + $("#reallocation_price_diff").val(result.price_diff); + $("#reallocation_price_diff_block").show(); + } + } else { + $(".realloc_roomtype_change_message").hide(); + } + $('#room_type_change_info').empty(); + if (result.is_changes_present == 1) { + } + } else if (typeof(result.error) != 'undefinded' && result.error) { + showErrorMessage(result.error); + } else { + showErrorMessage(txtSomeErr); + } + + $(".loading_overlay").hide(); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + $(".loading_overlay").hide(); + showErrorMessage(txtSomeErr); + } + }); + } else { + $(".loading_overlay").hide(); + showErrorMessage(txtSomeErr); + return false; + } + }); + + /*For reallocating rooms in the modal*/ + $("#realloc_allocated_rooms").on('click', function(e){ $(".error_text").text(''); - if ($('#realloc_avail_rooms').val() == 0) { + var room_to_reallocate = $('#realloc_avail_rooms').val(); + var room_type_to_reallocate = $('#realloc_avail_room_type').val(); + + if (typeof room_type_to_reallocate == 'undefined' || room_type_to_reallocate == 0) { + $("#realloc_sel_rm_type_err_p").text(slct_rm_type_err); + return false; + } + if (typeof room_to_reallocate == 'undefined' || room_to_reallocate == 0) { $("#realloc_sel_rm_err_p").text(slct_rm_err); return false; } }); - $("#swap_allocated_rooms").on('click', function(e) { + + /*For swaping rooms in the modal*/ + $("#swap_allocated_rooms").on('click', function(e){ $(".error_text").text(''); - if ($('#swap_avail_rooms').val() == 0) { + var room_to_swap = $('#swap_avail_rooms').val(); + if (typeof room_to_swap == 'undefined' || room_to_swap == 0) { $("#swap_sel_rm_err_p").text(slct_rm_err); return false; } }); +}); - $('#mySwappigModal').on('hidden.bs.modal', function(e) { - $(".modal_date_from").val(''); - $(".modal_date_to").val(''); - $(".modal_id_room").val(''); - $(".modal_curr_room_num").val(''); - $(".cust_name").text(''); - $(".cust_email").text(''); - $(".swp_rm_opts").remove(); - $(".realloc_rm_opts").remove(); - }); - - $('#mySwappigModal').on('shown.bs.modal', function(e) { - $(".modal_date_from").val(e.relatedTarget.dataset.date_from); - $(".modal_date_to").val(e.relatedTarget.dataset.date_to); - $(".modal_id_room").val(e.relatedTarget.dataset.id_room); - $(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num); - $(".cust_name").text(e.relatedTarget.dataset.cust_name); - $(".cust_email").text(e.relatedTarget.dataset.cust_email); - html = ''; - if (e.relatedTarget.dataset.avail_rm_realloc) { - var json_arr_rm_swp = JSON.parse(e.relatedTarget.dataset.avail_rm_swap); - $.each(json_arr_rm_swp, function(key, val) { - html += ''; +function setRoomsForReallocation(roomsAvailable) +{ + if (typeof(roomsAvailable) != 'undefined' && roomsAvailable.length) { + var roomsHtml = ''; - html = ''; - if (e.relatedTarget.dataset.avail_rm_realloc) { - var json_arr_rm_realloc = JSON.parse(e.relatedTarget.dataset.avail_rm_realloc); - $.each(json_arr_rm_realloc, function(key, val) { - html += ''; - }); - } - if (html != '') { - $("#realloc_avail_rooms").append(html); - } - }); -}); \ No newline at end of file + $(".realloc_avail_rooms_container").empty().append(roomsHtml); + } else { + $(".realloc_avail_rooms_container").empty().text(no_realloc_rm_avail_txt); + } +} diff --git a/modules/hotelreservationsystem/views/js/admin/wk_refund_request.js b/modules/hotelreservationsystem/views/js/admin/wk_refund_request.js index 8f74a0b68..4395ff914 100644 --- a/modules/hotelreservationsystem/views/js/admin/wk_refund_request.js +++ b/modules/hotelreservationsystem/views/js/admin/wk_refund_request.js @@ -18,6 +18,10 @@ */ $(document).ready(function() { + // manage refund options checkboxes as per the refund paramenters + if ($('#order_return_form .table input[name^="refund_amounts"]').length) { + manageRefundOptions(); + } // initialize tootip for room price if ($('#rooms_refund_info .price_info').length) { @@ -91,32 +95,38 @@ $(document).ready(function() { }); $(document).on('keyup', '#order_return_form .table input[name^="refund_amounts"]', function() { - let refundAmountInputs = $('#order_return_form .table input[name^="refund_amounts"]'); + manageRefundOptions(); + }); +}); - let disableRefundOptions = false; +// This function manages (Enable/disable) the refund options check-boxes according to the refund parameters like refund amount +function manageRefundOptions() +{ + let refundAmountInputs = $('#order_return_form .table input[name^="refund_amounts"]'); + + let disableRefundOptions = false; + $(refundAmountInputs).each(function(index, element) { + let val = parseFloat($(element).val().trim()); + if (isNaN(val)) { // if at least one amount input is empty + disableRefundOptions = true; + return; + } + }); + + if (!disableRefundOptions) { + let hasAllZero = true; $(refundAmountInputs).each(function(index, element) { let val = parseFloat($(element).val().trim()); - if (isNaN(val)) { // if at least one amount input is empty - disableRefundOptions = true; + if (val != 0) { + hasAllZero = false; return; } }); - if (!disableRefundOptions) { - let hasAllZero = true; - $(refundAmountInputs).each(function(index, element) { - let val = parseFloat($(element).val().trim()); - if (val != 0) { - hasAllZero = false; - return; - } - }); - - if (hasAllZero) { // if all amount inputs are 0 - disableRefundOptions = true; - } + if (hasAllZero) { // if all amount inputs are 0 + disableRefundOptions = true; } + } - $('#generateCreditSlip, #refundTransactionAmount, #generateDiscount').attr('disabled', disableRefundOptions); - }); -}); \ No newline at end of file + $('#generateCreditSlip, #refundTransactionAmount, #generateDiscount').attr('disabled', disableRefundOptions); +} diff --git a/modules/hotelreservationsystem/views/js/searchResultsMap.js b/modules/hotelreservationsystem/views/js/searchResultsMap.js index 59a6f4047..cc58afebd 100644 --- a/modules/hotelreservationsystem/views/js/searchResultsMap.js +++ b/modules/hotelreservationsystem/views/js/searchResultsMap.js @@ -23,7 +23,7 @@ function initMap() { lng: Number(hotel_location.longitude), }; - const map = new google.maps.Map($($('#search-results-wrap .map-wrap')).get(0), { + const map = new google.maps.Map($('#search-results-wrap .map-wrap').get(0), { zoom: 10, center: hotelLocation, disableDefaultUI: true, @@ -49,7 +49,11 @@ function initMap() { } $(document).ready(function() { - if (typeof google == 'object' && typeof hotel_location == 'object') { + if (typeof hotel_location == 'object' + && $('#search-results-wrap .map-wrap').length + && typeof google == 'object' + && typeof google.maps == 'object' + ) { initMap(); } }); diff --git a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl index d9b047f82..4ef90c7d8 100644 --- a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl @@ -32,28 +32,31 @@ {else} {assign var=hook_arg_id_hotel value=null} {/if} + {hook h='displayAdminAddHotelFormTop' id_hotel=$hook_arg_id_hotel} {if count($languages) > 1} -
      - - - - -

      {l s='Change language here to update information in multiple languages.' mod='hotelreservationsystem'}

      -
      +
      +
      + + + + +

      {l s='Change language here to update information in multiple languages.' mod='hotelreservationsystem'}

      +
      +
      {/if} - + {hook h='displayAdminAddHotelFormTabsBefore' id_hotel=$hook_arg_id_hotel}
      + {hook h='displayAdminAddHotelFormInformationTabBefore' id_hotel=$hook_arg_id_hotel} + {if isset($edit)} {/if} @@ -96,9 +101,9 @@
      - + - +
      @@ -112,14 +117,35 @@ {foreach from=$languages item=language} {assign var="hotel_name" value="hotel_name_`$language.id_lang`"} + {/foreach} +
      +
      +
      + +
      + {foreach from=$languages item=language} + {assign var="link_rewrite" value="link_rewrite_`$language.id_lang`"} + {/foreach}
      +
      + +
      - +
      - +
      - +
      - +
      @@ -219,7 +245,7 @@ {if $country_var} {foreach $country_var as $countr} - + {/foreach} {/if} @@ -227,19 +253,15 @@
      ** {l s='If Hotel\'s country is not present in country list then import that country from' mod='hotelreservationsystem'} {l s='Localization' mod='hotelreservationsystem'} {l s='tab.' mod='hotelreservationsystem'}
      -
      - +
      +
      @@ -248,13 +270,13 @@
      - +
      - +
      @@ -288,15 +310,19 @@
      {/if} + + {hook h='displayAdminAddHotelFormInformationTabAfter' id_hotel=$hook_arg_id_hotel}
      + {hook h='displayAdminAddHotelFormImagesTabBefore' id_hotel=$hook_arg_id_hotel} + {if isset($hotel_info.id) && $hotel_info.id}
      - +

      @@ -312,8 +338,12 @@ {l s='Please save hotel information before saving hotel images.' mod='hotelreservationsystem'}
      {/if} + + {hook h='displayAdminAddHotelFormImagesTabAfter' id_hotel=$hook_arg_id_hotel}
      + {hook h='displayAdminAddHotelFormRestrictionsTabBefore' id_hotel=$hook_arg_id_hotel} + {if isset($hotel_info.id) && $hotel_info.id}
      {/if} + + {hook h='displayAdminAddHotelFormRestrictionsTabAfter' id_hotel=$hook_arg_id_hotel}
      + {hook h='displayAdminAddHotelFormRefundPoliciesTabBefore' id_hotel=$hook_arg_id_hotel} + {if isset($hotel_info.id) && $hotel_info.id}
      {else}
      - {l s='No refund rules are created yet.' mod='hotelreservationsystem'} {l s='You can create refund rules by visiting '} {l s='create refund rules'} + {l s='No refund rules are created yet.' mod='hotelreservationsystem'} {l s='You can create refund rules by visiting ' mod='hotelreservationsystem'} {l s='create refund rules' mod='hotelreservationsystem'}
      {/if}
      @@ -449,10 +483,15 @@ {l s='Please save hotel information before saving refund policy options.' mod='hotelreservationsystem'}
      {/if} + + {hook h='displayAdminAddHotelFormRefundPoliciesTabAfter' id_hotel=$hook_arg_id_hotel}
      {hook h='displayAdminAddHotelFormTabContent' id_hotel=$hook_arg_id_hotel}
      + + {hook h='displayAdminAddHotelFormBottom' id_hotel=$hook_arg_id_hotel} + -
      date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}style="display:none;"{/if}> + +
      date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}style="display:none;"{/if}> -
      -

      - -

      +
      -
      is_special_days_exists) && $objFeaturePrice->is_special_days_exists)} - style="display:block;" - {/if}> -
      +
      + +
      is_special_days_exists) && $objFeaturePrice->is_special_days_exists)}style="display:block;"{/if}> + +
      +

      {l s='Mon' mod='hotelreservationsystem'}

      -
      +

      {l s='Tue' mod='hotelreservationsystem'}

      -
      +

      {l s='Wed' mod='hotelreservationsystem'}

      -
      +

      {l s='Thu' mod='hotelreservationsystem'}

      -
      +

      {l s='Fri' mod='hotelreservationsystem'}

      -
      +

      {l s='Sat' mod='hotelreservationsystem'}

      -
      +
      getAdminLink('AdminHotelFeaturePricesSettings')} {addJsDef defaultcurrency_sign = $defaultcurrency_sign mod='hotelreservationsystem'} {addJsDef booking_date_from = $date_from mod='hotelreservationsystem'} -{/strip} \ No newline at end of file +{/strip} + +{block name=script} + +{/block} diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_features/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_features/helpers/form/form.tpl index 8a5472710..2464898f4 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_features/helpers/form/form.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_features/helpers/form/form.tpl @@ -133,3 +133,10 @@ {addJsDefL name=chld_ftr_text_err}{l s='Enter child feature name.' js=1 mod='hotelreservationsystem'}{/addJsDefL} {addJsDefL name=pos_numeric_err}{l s='Position should be numeric.' js=1 mod='hotelreservationsystem'}{/addJsDefL} {/strip} + +{block name=script} + +{/block} diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-cart.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-cart.tpl index c408bbf6c..8f59550ad 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-cart.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-cart.tpl @@ -27,8 +27,8 @@ {$cart_data['room_num']|escape:'htmlall':'UTF-8'} {$cart_data['room_type']|escape:'htmlall':'UTF-8'} {dateFormat date=$cart_data['date_from']} - {dateFormat date=$cart_data['date_to']} - {convertPrice price=$cart_data['amt_with_qty']} - + {convertPrice price=($cart_data['amt_with_qty'] + $cart_data['additional_services_auto_add_with_room_price'] + $cart_data['additional_service_price'] + $cart_data['demand_price'])} + {/foreach} {/if} @@ -54,7 +54,7 @@ {$cart_data['name']|escape:'htmlall':'UTF-8'} {$cart_data['hotel_name']|escape:'htmlall':'UTF-8'} {$cart_data['quantity']|escape:'htmlall':'UTF-8'} - {convertPrice price=$cart_data['total_price_tax_incl']} + {convertPrice price=$cart_data['total_price_tax_excl']} {/foreach} @@ -69,7 +69,7 @@
      - + @@ -80,7 +80,7 @@ {foreach from=$book_v['data']['available'] key=avai_k item=avai_v} - + {if $occupancy_required_for_booking} {/if} - + {if $occupancy_required_for_booking} {if $rm_dtl_v@first} - + {/if} @@ -220,7 +300,7 @@
      {l s='Total Amount (Tax incl.):' mod='hotelreservationsystem'}{l s='Total Amount (Tax excl.):' mod='hotelreservationsystem'} {if isset($cart_tamount)}{convertPrice price=$cart_tamount}{else}{convertPrice price=0}{/if}
      {$avai_v['room_num']|escape:'htmlall':'UTF-8'}{$avai_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$avai_v type='available'} {dateFormat date=date('Y-m-d', strtotime($date_from))} - {dateFormat date=date('Y-m-d', strtotime($date_to))} {$avai_v['room_comment']|escape:'htmlall':'UTF-8'} @@ -50,45 +50,85 @@ {$allotment_type.name|escape:'htmlall':'UTF-8'} {/foreach} - + {$sub_part_v['room_num']|escape:'htmlall':'UTF-8'}{$sub_part_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$sub_part_v type='partially_available'} {foreach $allotment_types as $allotment_type} {/foreach} - +
      {$booked_v['room_num']|escape:'htmlall':'UTF-8'}{$booked_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$booked_v key=$rm_dtl_k type='booked'}{dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_to']))} {$rm_dtl_v['comment']|escape:'htmlall':'UTF-8'} {if $rm_dtl_v['booking_type'] == HotelBookingDetail::ALLOTMENT_AUTO} - {else} @@ -259,4 +339,4 @@ {/foreach} - \ No newline at end of file + diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/service-products.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/service-products.tpl index fe6bf1de0..347b3f07c 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/service-products.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/service-products.tpl @@ -34,6 +34,6 @@ {else}
      -

      {l s="No service products found." mod="hotelreservationsystem"}

      +

      {l s="No service products found." mod='hotelreservationsystem'}

      {/if} \ No newline at end of file diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl index 936793a14..88b9e0da9 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl @@ -1,5 +1,5 @@
      - {if $hotel_list|count > 0} + {if isset($hotel_list) && is_array($hotel_list) && count($hotel_list)}
      @@ -64,7 +64,7 @@