Example #1
0
* select timeframe for receipt
* 
* Settings
* 
* 01/06/2004 by Christian Ehret chris@uffbasse.de
*/
$smartyType = "www";
include_once "../includes/default.inc.php";
$auth->is_authenticated();
$smarty->assign("tpl_title", "Liste über Zeitraum erstellen");
$smarty->assign("tpl_title", "Archiv");
$smarty->assign('tpl_nav', 'archive');
$smarty->assign('tpl_subnav', '');
$theguestid = $request->GetVar('guestid', 'get');
include_once "kassaclass.inc.php";
$kassacls = new Kassa();
include_once "barguestclass.inc.php";
$barguest = new Barguest();
if ($request->GetVar('frm_start', 'get') !== $request->undefined) {
    include_once 'articlecatclass.inc.php';
    $articlecat = new articlecat();
    $allcats = $articlecat->getall();
    for ($i = 0; $i < count($allcats); $i++) {
        $cats[$i] = $allcats[$i]['articlecatid'];
    }
    $theguestid = $request->GetVar('frm_theguestid', 'get');
    $start = $request->GetVar('frm_start', 'get');
    $end = $request->GetVar('frm_end', 'get');
    $guestarticles = $kassacls->getTimeline($theguestid, $start, $end, 'ASC', $cats);
    $smarty->assign('tpl_guestarticles', $guestarticles);
}
Example #2
0
}
if ($request->GetVar('guestid', 'get') !== $request->undefined) {
    $theguestid = $request->GetVar('guestid', 'get');
    $theguest = $barguest->getName($theguestid);
    $thegroupcolor = $barguest->getGroupColor($theguestid);
    $thebookingcat = $barguest->getBookingcat($theguestid);
    include_once "articleclass.inc.php";
    $articlecls = new Article();
    //$articles = $articlecls->Getall(true);
    $articles = array();
    for ($i = 0; $i < count($cats); $i++) {
        $cats[$i]['articles'] = $articlecls->Getallcat(true, $cats[$i]['articlecatid']);
    }
    $smarty->assign('tpl_articles', $articles);
    include_once "kassaclass.inc.php";
    $kassacls = new Kassa();
    if ($request->GetVar('frm_checkout', 'post') == "true") {
        $payids = $request->getVar('payid', 'post');
        for ($i = 0; $i < count($payids); ++$i) {
            $kassacls->pay($payids[$i]);
        }
        $cat = "abrechnung";
        $selectedcats = $request->GetVar('frm_selectedcat', 'post');
        if ($request->GetVar('frm_setinactive', 'post') == "true") {
            $kassacls->checkout($theguestid, $request->GetVar('frm_setinactive', 'post'));
        }
    }
    if ($request->GetVar('frm_storno', 'post') == "true") {
        $selectedcats = $request->GetVar('frm_selectedcat', 'post');
        $kassacls->storno($request->GetVar('frm_boughtid', 'post'));
        $cat = "abrechnung";
Example #3
0
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
* 
*   This copyright notice MUST APPEAR in all copies of the script!
*/
/**
* View "receipt" as HTML (for POS-Printer)
* 
* 
* 11/19/2005 by Christian Ehret chris@uffbasse.de
*/
$smartyType = "www";
include_once "../includes/default.inc.php";
$auth->is_authenticated();
include_once "kassaclass.inc.php";
$kassacls = new Kassa();
include_once "barguestclass.inc.php";
$barguest = new Barguest();
if ($request->GetVar('frm_selectedcat', 'post') !== $request->undefined) {
    $cats = $request->GetVar('frm_selectedcat', 'post');
} else {
    $cats = array();
}
if ($request->GetVar('payid', 'post') !== $request->undefined) {
    $items = $request->GetVar('payid', 'post');
} else {
    $items = array();
}
if ($request->GetVar('frm_guestid', 'post') !== $request->undefined) {
    $theguestid = $request->GetVar('frm_guestid', 'post');
    $guestarticles = $kassacls->getBon($theguestid, $cats, $items);
Example #4
0
 public static function tallenna_tulos($keikkaid)
 {
     $parametrit = $_POST;
     $keikka = Keikka::etsi($keikkaid);
     $keikka->saalis = $parametrit['saalis'];
     $keikka->kommentti = $parametrit['kommentti'];
     $virheet = $keikka->validoi_tulos(is_numeric($parametrit['saalis']));
     $onko_numero = !is_numeric($parametrit['saalis']);
     if (count($virheet) == 0 && !$onko_numero) {
         $keikka->kirjaa_tulos($_SESSION['karhuid']);
         Kassa::maksa_keikan_palkka($keikkaid);
         if ($keikka->saalis == 0) {
             $viesti = 'Keikan tulos kirjattu. Keikka epäonnistui, koska saalista ei saatu.';
         } else {
             $saldo = Karhu::etsi($_SESSION['karhuid'])->saldo;
             $viesti = 'Keikan tulos kirjattu ja palkat maksettu osallistujille! Kokonaissaldosi on nyt ' . $saldo;
         }
         Redirect::to('/keikat', array('viesti' => $viesti));
     } else {
         View::make('keikka/kirjaus.html', array('virheet' => $virheet, 'keikka' => $keikka, 'onko_numero' => $onko_numero));
     }
 }
Example #5
0
* Show bar interface
* 
* bar interface
* 
* 07/24/2003 by Christian Ehret chris@uffbasse.de
*/
$smartyType = "www";
include_once "../includes/default.inc.php";
$auth->is_authenticated();
include_once "barguestclass.inc.php";
$barguest = new Barguest();
$theguestid = -1;
$theguest = "";
if ($request->GetVar('guestid', 'get') !== $request->undefined) {
    $theguestid = $request->GetVar('guestid', 'get');
    $theguest = $barguest->getName($theguestid);
    include_once "kassaclass.inc.php";
    $kassacls = new Kassa();
    if ($request->GetVar('frm_checkout', 'post') == "true") {
        $kassacls->checkout($theguestid, $request->GetVar('frm_setinactive', 'post'));
    }
    $articles = $kassacls->get($theguestid);
    $smarty->assign('tpl_articles', $articles);
}
$barguests = $barguest->getAll();
$smarty->assign('tpl_barguests', $barguests);
$smarty->assign('tpl_theguestid', $theguestid);
$smarty->assign('tpl_theguest', $theguest);
$smarty->assign("tpl_title", "ZVS Barinterface");
$smarty->assign("tpl_nav", "kassa");
$smarty->display('kassa.tpl');