use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("<script>\n\nfunction PriceincCheckMainDiv(enabled)\n{\n	document.getElementById(\'PriceincDiv\').style.display = enabled ? \'\' : \'none\';\n	// tinyMCE.init(TinymceConfig);\n}\n\n</script>\n\n");$C->{checked} = $C->{HasPriceinc} ? 'checked' : '';$this->out("<input type=\"hidden\" name=\"priceinc_yes\" value=\"\">\n<div class=\"custom-control custom-checkbox custom-control-inline\">\n	<input id=\"checkbox_1\" type=\"checkbox\" name=\"priceinc_yes\" value=\"1\" class=\"custom-control-input\" $C->{checked} onClick=\"PriceincCheckMainDiv(this.checked)\">\n	<label for=\"checkbox_1\" class=\"custom-control-label\">Dynamic Pricing</label>\n</div>\n\n<div id=\"PriceincDiv\" style=\"display: none\">\n\n	<div class=\"form-group\">\n		<label>Start date</label>\n		$C->{Form}{date_start}\n	</div>\n\n	<div class=\"form-group\">\n		<label>Start time</label>\n		$C->{Form}{time_start}\n	</div>\n\n	<div class=\"form-group\">\n		<label>End date</label>\n		$C->{Form}{date_end}\n		<span id=\"textHelpBlock\" class=\"form-text small text-muted\">Leave end date empty for unlimited</span>\n	</div>\n\n	<div class=\"form-group\">\n		<label>End time</label>\n		$C->{Form}{time_end}\n	</div>\n\n	<div class=\"form-group\">\n		<label>Start price</label>\n		$C->{Form}{price_start}\n		<span id=\"textHelpBlock\" class=\"form-text small text-muted\">leave start price 0 to use product price of Special prices defined for this product</span>\n	</div>\n\n	<div class=\"form-group\">\n		<label>End price</label>\n		$C->{Form}{price_end}\n		<span id=\"textHelpBlock\" class=\"form-text small text-muted\">leave end price 0 for unlimited</span>\n	</div>\n\n	<div class=\"form-group\">\n		<label style=\"color:red\">* Increase by</label>\n		$C->{Form}{incr}\n		<span id=\"textHelpBlock\" class=\"form-text small text-muted\">flat amount \"Y\" or percent \"Y\%\"</span>\n	</div>\n\n	<div class=\"form-group\">\n		<label style=\"color:red\">* Every</label>\n		$C->{Form}{period_l}\n		$C->{Form}{period_u}\n		<span id=\"textHelpBlock\" class=\"form-text small text-muted\">if \"Every N sale(s)\" is selected, then the start date and the end date are ignored</span>\n	</div>\n\n	<div class=\"form-group\">\n		<div class=\"custom-control custom-checkbox\">\n			<input id=\"chbx_priceinc_jsflow\" type=\"checkbox\" name=\"priceinc_jsflow\" value=\"1\" class=\"custom-control-input\">\n			<label for=\"chbx_priceinc_jsflow\" class=\"custom-control-label\">Display dynamic counter</label>\n		</div>\n	</div>\n\n	<div class=\"form-group\">\n		<input class=\"btn btn-primary\" type=\"button\" value=\"Get the description code\" onClick=\"prompt(\'You can copy this code and paste it on any HTML page\', \'<script src=&quot;$C->{SYS}{URI}/master/store/products/priceinc_show.txt?pid=$C->{PID}&quot;></script>\')\">\n	</div>\n\n	<div class=\"form-group\">\n		<label style=\"color:red\">You can also modify the description template:</label>\n		$C->{Form}{template}\n	</div>\n\n</div>\n\n<script>PriceincCheckMainDiv($C->{HasPriceinc});</script>\n");}