<?php
    use \koolreport\excel\Table;

    $sheet1 = "Sales by Customer";
?>
<meta charset="UTF-8">

<div sheet-name="<?php echo $sheet1; ?>">
    <?php
    $spreadsheetStyle = [
		'font' => [
			'bold' => false,
			'italic' => true,
			'underline' => false,
			'strikethrough' => true,
			'name' => 'Arial',
			'size' => '14',
			'color' => '808080',
		],
		'border' => [
			// 'color' => '000000',
			'width' => 'thick', //'thin', 'medium', 'thick'
			// 'style' => 'solid', //'none', 'solid', 'dashed', 'dotted', 'double'.
			'top' => [
				'color' => '000000',
				'width' => 'medium', //'thin', 'medium', 'thick'
				'style' => 'solid', //'none', 'solid', 'dashed', 'dotted', 'double'.
			],
			'right' => [],
			'bottom' => [],
			'left' => [],
		],
		'backgroundColor' => '00ff00',
		'wrapText' => true,
	];
    ?>
    <div><strong>
        Appointments Report
    </strong></div>

    <div>
        <?php
        Table::create(array(
            "dataSource" => $this->dataStore('myappts'),
            "removeDuplicate"=>array("name", "concatday"),

                 "columns"=>array(
                  
                "concatday"=>array(
                    "label"=>"Start-date",
                ),
                 "name"=>array(
                    "label"=>"Service Name",
                ),
                 "starttimefixed"=>array(
                    "label"=>"Start-time",
                ),
                "endtimefixed"=>array(
                    "label"=>"End-time",
                ),
                 "booktimefixed"=>array(
                    "label"=>"Book-time",
                ),
                 "companyname"=>array(
                    "label"=>"Company",
                ),
             
                
                "first_name"=>array(
                    "label"=>"First Name",
                ),
                "last_name"=>array(
                    "label"=>"Last Name",
                ),
                "email"=>array(
                    "label"=>"Email",
                ),
                "phone_number"=>array(
                    "label"=>"Phone Number",
                ),
                "address"=>array(
                    "label"=>"Address",
                ),
                 "city"=>array(
                    "label"=>"City",
                ),
                 "zipcode"=>array(
                    "label"=>"Zipcode",
                ),
                "birthdate"=>array(
                    "label"=>"Birthdate",
                ),
                 "concatbookday"=>array(
                    "label"=>"Date booked",
                ),
                 "booktimefixed"=>array(
                    "label"=>"Time booked",
                ),
                "usernotes"=>array(
                    "label"=>"Customer Notes",
                ),
                "apptnotes"=>array(
                    "label"=>"Backend notes",
                ),),
        ));
        ?>
    </div>
    
</div>
