Beispiel #1
0
    public function form_content()
    {
        ob_start();
        ?>
        <form method="get" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">
        <div class="row">
            <?php 
        echo FormLib::standardItemFields();
        ?>
            <?php 
        echo FormLib::standardDateFields();
        ?>
        </div>
        <div class="row form-horizontal">
            <div class="form-group">
                <label class="col-sm-2 control-label">Sum movement by?</label>
                <div class="col-sm-2">
                    <select name="sort" class="form-control">
                        <option>PLU</option>
                        <option>Date</option>
                        <option>Department</option>
                        <option>Weekday</option>
                    </select> 
                </div>
                <label class="col-sm-1 control-label">Store</label>
                <div class="col-sm-2">
                    <?php 
        $s = FormLib::storePicker();
        echo $s['html'];
        ?>
                </div>
                <label class="col-sm-2 control-label">
                    <input type="checkbox" name="excel" value="csv" />
                    Excel
                </label>
            </div>
        </div>
        <p>
            <button type="submit" class="btn btn-default btn-core">Get Report</button>
            <button type="reset" class="btn btn-default btn-reset">Reset Form</button>
        </p>
        </form>
        <?php 
        return ob_get_clean();
    }
Beispiel #2
0
}
td.right {
    padding-left: 4em;
    text-align: right;
}
td.center {
    padding-left: 2em;
    padding-right: 2em;
    text-align: center;
}
</style>
</head>
<body bgcolor='#ffffff'><font size=2> 
<?php 
}
$storeInfo = FormLib::storePicker();
if ($excel === false) {
    echo "<form action=index.php name=datelist method=get>";
    echo "<input name=date type=text id=date value=\"" . FormLib::get('date') . "\">";
    echo "<input name=Submit type=submit value=submit>";
    echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
    echo $storeInfo['html'];
    echo "</form>";
}
$today = date("m/j/y");
// Calculate the previous day's date, old method just gave zero - Andy
$repDate = date('m/j/y', mktime(0, 0, 0, date("m"), date("d") - 1, date("Y")));
$dstr = date("Y-m-d", strtotime("yesterday"));
if (FormLib::get('date') !== '') {
    $repDate = FormLib::get('date');
    $stamp = strtotime($repDate);
Beispiel #3
0
    public function form_content()
    {
        ob_start();
        ?>
<form method="get" class="form-horizontal">
<div class="row">
    <div class="col-sm-6">
        <?php 
        echo FormLib::standardDepartmentFields('buyer');
        ?>
        <div class="form-group">
            <label class="col-sm-4 control-label">
                Group by weekday?
                <input type=checkbox name=weekday value=1>
            </label>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-4">Save to Excel
                <input type=checkbox name=excel id=excel value=1>
            </label>
            <label class="col-sm-4 control-label">Store</label>
            <div class="col-sm-4">
                <?php 
        $ret = FormLib::storePicker();
        echo $ret['html'];
        ?>
            </div>
        </div>
    </div>
    <div class="col-sm-5">
        <div class="form-group">
            <label class="col-sm-4 control-label">Start Date</label>
            <div class="col-sm-8">
                <input type=text id=date1 name=date1 class="form-control date-field" required />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">End Date</label>
            <div class="col-sm-8">
                <input type=text id=date2 name=date2 class="form-control date-field" required />
            </div>
        </div>
        <div class="form-group">
            <?php 
        echo FormLib::date_range_picker();
        ?>
                            
        </div>
    </div>
</div>
    <p>
        <button type=submit name=submit value="Submit" class="btn btn-default btn-core">Submit</button>
        <button type=reset name=reset class="btn btn-default btn-reset"
            onclick="$('#super-id').val('').trigger('change');">Start Over</button>
    </p>
</form>
        <?php 
        $this->addOnloadCommand("\$('#subdepts').closest('.form-group').hide();");
        return ob_get_clean();
    }
Beispiel #4
0
    function form_content()
    {
        global $FANNIE_OP_DB;
        $dbc = FannieDB::get($FANNIE_OP_DB);
        $deptQ = $dbc->prepare_statement("select dept_no,dept_name from departments order by dept_no");
        $deptR = $dbc->exec_statement($deptQ);
        $depts = array();
        while ($deptW = $dbc->fetch_array($deptR)) {
            $depts[$deptW['dept_no']] = $deptW['dept_name'];
        }
        $superQ = $dbc->prepare_statement("SELECT superID,super_name FROM superDeptNames \n            ORDER BY superID");
        $superR = $dbc->exec_statement($superQ);
        $supers = array();
        while ($superW = $dbc->fetch_row($superR)) {
            $supers[$superW['superID']] = $superW['super_name'];
        }
        $subs = array();
        if (count($depts) > 0) {
            $dept_numbers = array_keys($depts);
            $first = $dept_numbers[0];
            $subsP = $dbc->prepare('
                SELECT subdept_no,
                    subdept_name
                FROM subdepts
                WHERE dept_ID=?
                ORDER BY subdept_no');
            $subsR = $dbc->execute($subsP, array($first));
            while ($subsW = $dbc->fetch_row($subsR)) {
                $subs[$subsW['subdept_no']] = $subsW['subdept_name'];
            }
        }
        ob_start();
        ?>
        <form method="get" action="ProductListPage.php">
        <ul class="nav nav-tabs" role="tablist">
            <li class="active"><a href="#dept-tab" data-toggle="tab"
                onclick="$('#supertype').val('dept');">By Department</a></li>
            <li><a href="#manu-tab" data-toggle="tab"
                onclick="$('#supertype').val('manu');">By Brand</a></li>
            <li><a href="#vendor-tab" data-toggle="tab"
                onclick="$('#supertype').val('vendor');">By Vendor</a></li>
        </ul>
        <input id="supertype" name="supertype" type="hidden" value="dept" />
        <div class="tab-content">
            <p>
            <div class="tab-pane active" id="dept-tab">
                <div class="row form-horizontal">
                    <div class="col-sm-8">
                    <?php 
        echo FormLib::standardDepartmentFields('deptSub');
        ?>
                    </div>
                </div>
            </div>
            <div class="tab-pane" id="manu-tab">
                <div class="form-group form-inline">
                    <label><?php 
        echo _('Brand');
        ?>
</label>
                    <input type=text name=manufacturer class="form-control" />
                </div>
                <div class="form-group form-inline">
                    <label><input type=radio name=mtype value=prefix checked />
                        UPC prefix</label>
                    <label><input type=radio name=mtype value=name />
                        <?php 
        echo _('Brand name');
        ?>
</label>
                </div>
            </div>
            <div class="tab-pane" id="vendor-tab">
                <div class="form-group form-inline">
                    <label>Vendor</label>
                    <select name="vendor" class="form-control">
                    <?php 
        $vendors = new VendorsModel($dbc);
        foreach ($vendors->find('vendorName') as $v) {
            printf('<option value="%d">%s</option>', $v->vendorID(), $v->vendorName());
        }
        ?>
                    </select>
                </div>
            </div>
        </p>
        </div>
        <div class="form-group form-inline">
            <label>Sort by</label>
            <select name="sort" class="form-control">
                <option>Department</option>
                <option>UPC</option>
                <option>Description</option>
            </select> 
            <label>
                <input type=checkbox name="inUse" value="1" checked />
                In Use
            </label>
            |
            <label>
                <input type=checkbox name=excel />
                Excel
            </label>
        </div>
        <?php 
        if ($this->config->get('STORE_MODE') == 'HQ') {
            $picker = FormLib::storePicker();
            echo '<div class="form-group form-inline">
                <label>Store</label> ' . $picker['html'] . '</div>';
        }
        ?>
        <p> 
            <button type=submit name=submit class="btn btn-default btn-core">Submit</button>
            <button type=reset id="reset-btn" class="btn btn-default btn-reset"
                onclick="$('#super-id').val('').trigger('change');">Start Over</button>
        </p>
        </form>
        <?php 
        return ob_get_clean();
    }
Beispiel #5
0
    function body_content()
    {
        global $FANNIE_URL;
        ob_start();
        $this->add_script('js/cashier.js');
        if (!$this->window_dressing) {
            echo "<html>";
            echo "<head><title>{$this->title}</title>";
            echo "</head>";
            echo "<body>";
        }
        ?>
        <div id=input class="form-inline form-group">
        <form id="osForm" style='margin-top:1.0em;' onsubmit="loadCashier(); return false;">
        <label>Date</label>:<input class="form-control date-field" type=text name=date id=date required />
        <label>Cashier</label>:<input type=text name=empno id=empno class="form-control" required />
        <?php 
        $_REQUEST['store'] = 1;
        $sp = FormLib::storePicker();
        echo $sp['html'];
        ?>
        <button type=submit class="btn btn-default">Load Cashier</button>
        </form>
        </div>

        <div id=display>
        </div>
        <?php 
        return ob_get_clean();
    }
Beispiel #6
0
    function body_content()
    {
        global $FANNIE_URL;
        $user = FannieAuth::checkLogin();
        ob_start();
        ?>
        <form style='margin-top:1.0em;' id="osForm" onsubmit="setdate(); return false;" >
        <div class="form-group form-inline">
        <label>Date</label>:<input class="form-control date-field" type=text id=date name=arg />
        <select class="form-control" name="mode">
            <option value="cashier">Cashier</option>
            <option value="drawer">Drawer</option>
        </select>
        <?php 
        $_REQUEST['store'] = 1;
        $sp = FormLib::storePicker();
        echo $sp['html'];
        ?>
        <button type=submit class="btn btn-default">Set</button>
        <input type=hidden id=user value="<?php 
        if (isset($user)) {
            echo $user;
        }
        ?>
" />
        </div>
        </form>

        <div id="loading-bar" class="collapse">
            <?php 
        echo \COREPOS\Fannie\API\lib\FannieUI::loadingBar();
        ?>
        </div>
        <div id="forms"></div>
        <?php 
        return ob_get_clean();
    }