static function getOptions() { $factories = dbEach("select * from factories"); echo "<datalist id=\"factoryNames\">"; foreach ($factories as $factory) { echo "<option value=\"{$factory['name']}\">{$factory['name']}</option>"; } echo "</datalist>"; }
static function show($entryPerPage) { $shoes = dbEach("select * from inventory"); echo "<table class=\"table-panel -table-striped\" id=\"myTable\"> \n\t\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>সিরিয়াল</th>\n\t\t\t\t\t<th>আইডি</th>\n\t\t\t\t\t<th>বিবরণ</th>\n\t\t\t\t\t<th>গায়ের দাম</th>\n\t\t\t\t\t<th>ডজন দাম</th>\n\t\t\t\t\t<th>জোড়া</th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t<th></th>\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>"; //print_r($shoes); foreach ($shoes as $index => $eachShoe) { $serial = $index + 1; //echo "$eachShoe[pid] the pid"; $shoe = static::getProduct($eachShoe["pid"]); echo "<tr>\n\t\t\t\t\t<td>{$serial}</td>\n\t\t\t\t\t<td><input class=\"shoePid form-control input input-sm\" value=\"{$shoe->pid}\" readonly></td>\n\t\t\t\t\t<td class=\"shoeDescrTd\" ><span class=\"shoeDescr\">{$shoe->descr}</span></td>\n\t\t\t\t\t<td>{$shoe->sp}</td>\n\t\t\t\t\t<td>{$shoe->cpDoz}</td>\n\t\t\t\t\t<td>{$shoe->qty}</td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td></td>\n\t\t\t\t</tr>"; } echo "</tbody>\n\t\t\t\t</table>"; }
$fromdate = "{$year}-{$month}-{$day} 00:00:00"; $todate = "{$year}-{$month}-{$day} 23:59:59"; /*$fromdate = date('2013-01-01 00:00:00') ; $todate = date('2013-12-31 23:59:59') ;*/ //echo date('d'); $result = mysqli_query($con, "SELECT * FROM purchase_memos WHERE date_bought BETWEEN '{$fromdate}' AND '{$todate}'"); $total_expense = 0; //echo "<tr> <td>Affected rows: " . mysqli_affected_rows($con)." </td></tr>"; while ($prch_memo = mysqli_fetch_array($result)) { if ($prch_memo['paid'] > 0) { $curr_cash = $prch_memo['paid']; echo "<tr><td>" . $prch_memo['factory_name'] . "</td>\n <td>{$prch_memo['comment']}</td>\n <td>" . $curr_cash . "</td>\n </tr>"; $total_expense = $total_expense + $prch_memo['paid']; } } $companyChecks = dbEach("select * from company_check_log where date BETWEEN '{$fromdate}' AND '{$todate}' "); foreach ($companyChecks as $check) { # code... if ($check['paid'] > 0) { $curr_cash = $check['paid']; echo "<tr><td>" . $check['factory_name'] . "</td>\n <td>কোম্পানি চেক তাগাদা</td>\n <td>" . $curr_cash . "</td>\n </tr>"; $total_expense = $total_expense + $check['paid']; } } echo "<tr>\n\t\t\t\t\t\t\t \t\t\t<td>মোট</td>\n\t\t\t\t\t\t\t \t\t\t<td>" . $total_expense . "</td>\n <td></td>\n\t\t\t\t\t\t\t \t\t</tr>"; ?> </table> </div>
static function showColors() { $colors = dbEach("select * from colors order by tableIndex"); foreach ($colors as $color) { echo "<li>\n <span class=\"lead\" data-colorIndex=\"{$color['tableIndex']}\">{$color['name']}</span>\n <span class=\"divider-vertical\"></span>\n <span class=\"editColor fa fa-edit fa-2 cur\"></span>\n <span class=\"deleteColor fa fa-trash-o fa-2 cur\"></span>\n </li>"; } }
<th>পরিশোধিত</th> </tr> <?php $rows = dbEach("select * from company_check where (pending_date between '{$todayStart}' and '{$todayEnd}') order by pending_date asc"); foreach ($rows as $row) { $date = parseDateFromTime($row["pending_date"]); $issueDate = parseDateFromTime($row["issue_date"]); echo "<tr>\n <td>{$issueDate}</td>\n <td>{$date}</td>\n <td><a href=\"check_paid.php?factoryName={$row['factory_name']}\">{$row['factory_name']}</a></td>\n <td>{$row['amount']}</td>\n <td>{$row['payment_clear']}</td>\n </tr>"; } echo "-----------------"; ?> </table> <table class="table table-condensed table-striped table-bordered table-hover"> <tr> <th>ইস্যু তারিখ</th> <th>তারিখ</th> <th>কারখানা</th> <th>মোট পরিমান</th> <th>পরিশোধিত</th> </tr> <?php $upcomingRows = dbEach("select * from company_check where pending_date > '{$todayEnd}' order by pending_date asc"); foreach ($upcomingRows as $row) { $date = parseDateFromTime($row["pending_date"]); $issueDate = parseDateFromTime($row["issue_date"]); echo "<tr>\n <td>{$issueDate}</td>\n <td>{$date}</td>\n <td><a href=\"check_paid.php?factoryName={$row['factory_name']}\">{$row['factory_name']}</a></td>\n <td>{$row['amount']}</td>\n <td>{$row['payment_clear']}</td>\n </tr>"; } ?> </table> <?php include "bikri_khata_end.php";
echo "সফল"; // echo "insert into sells (company_name, memo_no,total_qty,total_price, sell_type) values ('$company_name', '$memo_no','$total_qty','$total_price', 'return')"; db("insert into sells (company_name, memo_no,total_qty,total_price, sell_type) values ('{$company_name}', '{$memo_no}','{$total_qty}','{$total_price}', 'return')"); // echo "insert into sell_memos (company_name, memo_no,total_qty,grand_total, sell_type,checked) values ('$company_name', '$memo_no','$total_qty','$grand_total', 'return','1')"; db("insert into sell_memos (company_name, memo_no,total_qty,grand_total, sell_type,checked) values ('{$company_name}', '{$memo_no}','{$total_qty}','{$grand_total}', 'return','1')"); db("update sell_memos set due='{$newDue}' where memo_no='{$memo_no}' "); } } ?> <hr> <form action="mf_shabek_add.php" method="post"> পার্টি : <input type="text" name="company_name" list="factories"> <datalist class ="" id="factories"> <?php $result = dbEach("select * from clients"); foreach ($result as $row) { echo "<option value=\"" . $row['company_name'] . "\">" . $row['company_name'] . "</option>"; } ?> </datalist> <br> জোড়া : <input type="text" name="total_qty"> <br> মাল ফেরত বাবদ: <input type="text" name="grand_total"> <br> <input type="submit" value="যোগ করুন"> </form> <?php
include "util.php"; ?> <h1>চেক বাকি</h1> <form action="inventory_check.php" method="post"> <table id="pack1"class="table table-condensed table-striped table-bordered table-hover"> <tr> <th>আইডি</th> <th>বিবরণ</th> <th>পরিমাণ</th> </tr> <?php //$inventory_check = dbEach("select * from inventory_check"); $inventory = dbEach("select * from inventory"); foreach ($inventory as $index => $entry) { $pid = $entry["pid"]; $checked = dbEach("select * from inventory_check where pid = '{$pid}' limit 1"); if ($checked != []) { unset($inventory[$index]); } elseif ($entry["total_qty"] < 1) { unset($inventory[$index]); } } foreach ($inventory as $entry) { $description = getDescription($pid); echo "<tr>\n <td>{$entry['pid']}</td>\n <td>{$description}</td>\n <td>{$entry['total_qty']}</td>\n </tr>"; } ?> </table> <span id="last-space"></span> <textarea name="inputStream"></textarea> <input class="btn btn-info pull-right" type="submit" value="যোগ করুন">
$dateData = explode('-', $dateObj); //print_r($dateData); $date = "{$dateData['2']} /{$dateData['1']} /{$dateData['0']}"; return $date; } ?> <h3 class="label label-info">চেক পাওনা</h3> <form action="check_paid.php" method="post"> কারখানা : <?php // $res = db("select * from factories"); // print_r($res); ?> <input type="text" id="factory_name" name="factoryName" list="factories" placeholder="লিখুন"> <datalist class ="" id="factories" onchange="javascript:checkFactoryName();"> <?php $result = dbEach("select * from factories"); //cannot use capital letters foreach ($result as $row) { echo "<option value=\"" . $row['factory_name'] . "\">" . $row['factory_name'] . "</option>"; } ?> </datalist> তাগাদা : <input type="text" name="paid"> <br> <input type="submit" class="btn" value="সাবমিট"> </form> <?php include "bikri_khata_end.php";
include "inventory_check_start.php"; require_once 'util.php'; ?> <table id="pack1"class="table table-condensed table-striped table-bordered table-hover"> <tr> <th>আইডি</th> <th>বিবরণ</th> <th>এন্ট্রি</th> <th>পরিমাণ</th> <th></th> <th>চেক বাকি</th> <th></th> </tr> <?php $pids = dbEach("select * from inventory_check"); foreach ($pids as $pidData) { $entry = $pidData["checked"]; $pid = $pidData["pid"]; $descr = getDescription($pid); $found = db("select * from inventory where pid='{$pid}' limit 1"); $qty = @$found["total_qty"]; $rem = $qty - $entry; if ($rem != 0) { echo "<tr class=\"product-col\">\n <td class=\"pid\">{$pid}</td>\n <td class=\"descr\">{$descr}</td>\n <td class=\"entry\">{$entry}</td>\n <td class=\"qty\">{$qty}</td>\n <td></td>\n <td class=\"rem\">{$rem}</td>\n <td class=\"\"><span class=\"pull-right del\">x</span></td>\n </tr>"; } } ?> <tr class="last-row"></tr> </table> <span id="last-space"></span>