$smarty->assign('tpl_theotherstart', $theotherstart); $smarty->assign('tpl_thestart', $thestart); $smarty->assign('tpl_start1', $thestart1); $smarty->assign('tpl_theotherstart1', $theotherstart1); $smarty->assign('tpl_end1', $theend1); $smarty->assign('tpl_theotherend1', $theotherend1); $smarty->assign('tpl_mwst', $receipt->getMwst()); $mwst = -1; if ($what == 'thedate') { list($day, $month, $year) = split('[.]', $thedate); $thestart = "{$year}-{$month}-{$day} 00:00:00"; $theend = "{$year}-{$month}-{$day} 23:59:59"; if ($request->GetVar('frm_mwst1', 'post') !== $request->undefined) { $mwst = $request->GetVar('frm_mwst1', 'post'); } $smarty->assign('tpl_receiptitems', $receipt->getitemslist($thestart, $theend, $mwst)); } elseif ($what == 'timeline') { list($day, $month, $year) = split('[.]', $theend1); $theend1 = "{$year}-{$month}-{$day} 23:59:59"; list($day, $month, $year) = split('[.]', $thestart1); $thestart1 = "{$year}-{$month}-{$day} 00:00:00"; if ($request->GetVar('frm_mwst2', 'post') !== $request->undefined) { $mwst = $request->GetVar('frm_mwst2', 'post'); } $smarty->assign('tpl_receiptitems', $receipt->getitemslist($thestart1, $theend1, $mwst)); } else { list($month, $year) = split('[/]', $theend); $theend = "{$year}-{$month}-01 00:00:00"; list($month, $year) = split('[/]', $thestart); $thestart = "{$year}-{$month}-01 00:00:00"; if ($request->GetVar('frm_mwst3', 'post') !== $request->undefined) {