in the file license.txt along with IS4C; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *********************************************************************************/ ?> <html> <head> <Title>Volunteer timesheets</Title> <link rel="stylesheet" href="../src/style.css" type="text/css" /> </head> <body> <?php include '../src/functions.php'; require_once '../src/mysql_connect.php'; if (isset($_POST['submit'])) { foreach ($_POST as $key => $value) { ${$key} = $value; } } else { foreach ($_GET as $key => $value) { ${$key} = $value; } } $query = "SELECT date(d.datetime) as date, SUM(d.total) as charges\n\tFROM custdata c, is4c_log.dtransactions d\n\tWHERE d.card_no = c.CardNo\n\tAND datetime >= '" . $ps . "'\n\tAND datetime <= '" . $pe . "'\n\tAND d.card_no = " . $cn . "\n\tAND c.staff IN(1,2) \n\tAND d.trans_subtype = 'MI'\n\tAND d.emp_no <> 9999 AND d.trans_status <> 'X'\n\tGROUP BY date(d.datetime)\n\tORDER BY date(d.datetime)"; $query2 = mysql_query("SELECT CardNo, LastName, FirstName FROM custdata WHERE CardNo = {$cn} AND staff IN(1,2)"); $row = mysql_fetch_assoc($query2); echo "<h1>Staff: " . $row["LastName"] . ", " . $row["FirstName"] . "</h1>"; select_to_table($query, 1, 'eeeeee'); ?>
echo "<h4>Store Charge Breakdown</h4>"; select_to_table($storeChargeQ,0,'FFCC99'); // store charge breakdown // select_to_table($houseChargeQ,0,'FFCC99'); // house charges select_to_table($transCountQ,0,'FFCC99'); // transaction count select_to_table($basketSizeQ,0,'FFCC99'); // basket size echo '------------------------------<br>'; echo '<h4>Membership & Discount Totals</h4><br>'; echo "<table border=0><font size=2>"; echo "<tr><td>staff total</td><td align=right>".money_format('%n',$staff_total)."</td></tr>"; echo "<tr><td>hoo total</td><td align=right>".money_format('%n',$hoo_total)."</td></tr>"; echo "<tr><td>benefits total</td><td align=right>".money_format('%n',$bene_total)."</td></tr>"; echo "<tr><td>bod total</td><td align=right>".money_format('%n',$bod_total)."</td></tr>"; echo "<tr><td>MAD coupon ($MAD_num)</td><td align=right>".money_format('%n',$MADcoupon)."</td></tr>"; echo "<tr><td>foodforall total ($ffa_num)</td><td align=right>".money_format('%n',$foodforall)."</td></tr>"; echo "<tr><td> </td><td align=right>+___________</td></tr>"; echo "<tr><td><b>total discount</td><td align=right>".money_format('%n',$totalDisc)."</b></td></tr></font></table>"; //select_to_table($percentsQ,0,'FFCC99'); // discounts awarded by percent //select_to_table($memstatus,0,'FFCC99'); //select_to_table($memtype,0,'FFCC99'); echo '<h4>Share Payments</h4><br>'; select_to_table($sharePaymentsQ,0,'FFCC99'); // peopleshare payments //echo '<b>Share count = '.$shareCount.'</b>'; // peopleshare count echo '<h4>Patronage Redemption</h4><br>'; select_to_table($patronage,0,'FFCC99'); // patronage redemption echo '</font>'; ?> </font> </body> </html>
if (isset($equity)) { $sharetotalsQ = "SELECT d.datetime AS datetime, d.emp_no AS emp_no, d.card_no AS cardno,c.LastName AS lastname,ROUND(sum(total),2) as total \n\t\t\tFROM " . DB_LOGNAME . ".{$table} as d, " . DB_NAME . ".custdata AS c\n\t\t\tWHERE d.card_no = c.CardNo\n\t\t\tAND d.datetime >= '{$date1a}' AND d.datetime <= '{$date2a}'\n\t\t\tAND d.department = 36 \n\t\t\tAND d.trans_status <> 'X'\n\t\t\tAND d.emp_no <> 9999\n\t\t\tGROUP BY d.datetime\n\t\t\tORDER BY d.datetime"; $sharetotalQ = "SELECT ROUND(SUM(d.total),2) AS Total_share_pmt\n\t\t\tFROM " . DB_LOGNAME . ".{$table} AS d\n\t\t\tWHERE d.datetime >= '{$date1a}' AND d.datetime <= '{$date2a}'\n\t\t\tAND d.department = 36\n\t\t\tAND d.trans_status <> 'X'\n\t\t\tAND d.emp_no <> 9999"; $sharetotalR = mysql_query($sharetotalQ); $row = mysql_fetch_row($sharetotalR); $sharetotal = $row[0]; $sharecountQ = "SELECT COUNT(d.total) AS peopleshareCount\n\t\t\tFROM " . DB_LOGNAME . ".{$table} AS d\n\t\t\tWHERE d.datetime >= '{$date1a}' AND d.datetime <= '{$date2a}'\n\t\t\tAND d.department = 36\n\t\t\tAND d.trans_status <> 'X'\n\t\t\tAND d.emp_no <> 9999"; $sharecountR = mysql_query($sharecountQ); $row = mysql_fetch_row($sharecountR); $sharecount = $row[0]; echo '<h1>Equity Report</h1>'; echo '<h4>Sales of Member Shares</h4>'; echo '<p>Total member share payments = <b>' . $sharetotal; echo '</b></p><p>Member Share count = <b>' . $sharecount; echo '</b></p>'; select_to_table($sharetotalsQ, 1, 'FFFFFF'); } } else { $page_title = 'Fannie - Reporting'; $header = 'Period Report'; include '../src/header.php'; echo '<form method="post" action="period.php" target="_blank"> <table border="0" cellspacing="5" cellpadding="5"> <tr> <td> <p><b>Date Start</b> </p> <p><b>End</b></p> </td> <td> <div class="date"><p><input type="text" name="date1" class="datepicker" /> *</p></div> <div class="date"><p><input type="text" name="date2" class="datepicker" /> *</p></div>
<?php $term = $conn->getTerm($idt); ?> <h1>Term: <?php echo_utf8($term->name); ?> </h1><?php ?> <h3>meta</h3><?php $atts['class'] = 'ink-table alternating hover'; $sql = "SELECT * FROM wp_termmeta WHERE term_id = {$idt}"; select_to_table($conn, $sql, $atts); ?> <br> <h3>taxonomias</h3><?php $list_txns = $conn->getTermTaxonomies($term->name); foreach ($list_txns as $tx) { echo $tx . "<br>" . PHP_EOL; }
<td width=120><u><font size=2><b>State Taxable</b></u></font></td> <td width=120><u><font size=2><b>State Tax</b></u></font></td> <td width=120><u><font size=2><b>City Taxable</b></u></font></td> <td width=120><u><font size=2><b>City Tax</b></u></font></td> <td width=120><u><font size=2><b>Deli Taxable</b></u></font></td> <td width=120><u><font size=2><b>Deli Tax</b></u></font></td></table>'; $queryCorrect = "select TaxableSales,TotalTax,StateTaxable,StateTax,CityTaxable,CityTax,DeliTaxable,DeliTax from is4c_trans.taxReport_corrected"; select_to_table($queryCorrect,array(),0,'ffffff'); */ echo '<br>'; echo '<b>Actual Tax Collected</b>'; select_to_table($query11, $args, 0, 'ffffff'); echo '<br>'; echo '<b>RRR Coupons Redeemed</b>'; select_to_table($queryRRR, $args, 0, 'ffffff'); echo '</font>'; echo "</font>\n </body>\n </html>"; $output = ob_get_contents(); \COREPOS\Fannie\API\data\DataCache::putFile("monthly", $output); ob_end_clean(); } echo $output; $newTaxQ = 'SELECT description, SUM(regPrice) AS ttl, numflag AS taxID FROM is4c_trans.transarchive WHERE datetime BETWEEN ? AND ? AND upc=\'TAXLINEITEM\' AND ' . DTrans::isNotTesting() . ' GROUP BY taxID, description';
select_to_table($transCountQ, 0, $bgcolor); // transaction count select_to_table($basketSizeQ, 0, $bgcolor); // basket size echo '------------------------------<br>'; echo '<h2>Membership & Discount Totals</h2><br>'; echo "<table border=0><font size=2>"; echo "<tr><td>staff total</td><td align=right>" . money_format('%n', $staff_total) . "</td></tr>"; echo "<tr><td>hoo total</td><td align=right>" . money_format('%n', $hoo_total) . "</td></tr>"; echo "<tr><td>benefits total</td><td align=right>" . money_format('%n', $bene_total) . "</td></tr>"; echo "<tr><td>bod total</td><td align=right>" . money_format('%n', $bod_total) . "</td></tr>"; echo "<tr><td>MAD coupon ({$MAD_num})</td><td align=right>" . money_format('%n', $MADcoupon) . "</td></tr>"; echo "<tr><td>foodforall total ({$ffa_num})</td><td align=right>" . money_format('%n', $foodforall) . "</td></tr>"; echo "<tr><td> </td><td align=right>+___________</td></tr>"; echo "<tr><td><b>total discount</td><td align=right>" . money_format('%n', $totalDisc) . "</b></td></tr></font></table>"; //select_to_table($percentsQ,0,$bgcolor); // discounts awarded by percent //select_to_table($memstatus,0,$bgcolor); //select_to_table($memtype,0,$bgcolor); echo '<h2>Share Payments</h2><br>'; select_to_table($sharePaymentsQ, 0, $bgcolor); // peopleshare payments //echo '<b>Share count = '.$shareCount.'</b>'; // peopleshare count echo '<h2>Patronage Redemption</h2><br>'; select_to_table($patronage, 0, $bgcolor); // patronage redemption echo '</font>'; ?> </font> </body> </html>
$dlog = DTransactionsModel::selectDlog($date); $args = array($date . ' 00:00:00', $date . ' 23:59:59'); $otherQ = "SELECT d.department,t.dept_name, sum(total) as total \n FROM {$dlog} as d join departments as t ON d.department = t.dept_no\n WHERE tdate BETWEEN ? AND ?\n AND (d.department >300)AND d.Department <> 0 AND d.register_no = 20\n GROUP BY d.department, t.dept_name order by d.department"; $stockQ = "SELECT d.card_no,t.dept_name, sum(total) as total \n FROM {$dlog} as d join departments as t ON d.department = t.dept_no\n WHERE tdate BETWEEN ? AND ?\n AND (d.department IN(991,992))AND d.Department <> 0 and d.register_no = 20\n GROUP BY d.card_no, t.dept_name ORDER BY d.card_no, t.dept_name"; $arQ = "SELECT d.card_no,CASE WHEN d.department = 990 THEN 'AR PAYMENT' ELSE 'STORE CHARGE' END as description, \n sum(total) as total, count(card_no) as transactions FROM {$dlog} as d \n WHERE tdate BETWEEN ? AND ?\n AND (d.department =990 OR d.trans_subtype = 'MI') and d.register_no = 20 \n GROUP BY d.card_no,d.department order by department,card_no"; echo 'Other'; echo '<br>------------------------------'; echo '<table><td width=120><u><font size=2><b>Dept</b></u></font></td> <td width=120><u><font size=2><b>Description</b></u></font></td> <td width=120><u><font size=2><b>Amount</b></u></font></td></table>'; select_to_table($otherQ, $args, 0, '99cccc'); echo '<br>'; echo 'Equity Payments by Member Number'; echo '<br>------------------------------'; echo '<table><td width=120><u><font size=2><b>MemNum</b></u></font></td> <td width=120><u><font size=2><b>Description</b></u></font></td> <td width=120><u><font size=2><b>Amount</b></u></font></td></table>'; select_to_table($stockQ, $args, 0, '99cccc'); echo '<br>'; echo 'AR Activity by Member Number'; echo '<br>------------------------------'; echo '<table><td width=120><u><font size=2><b>MemNum</b></u></font></td> <td width=120><u><font size=2><b>Description</b></u></font></td> <td width=120><u><font size=2><b>Amount</b></u></font></td> <td width=120><u><font size=2><b>Transactions</b></u></font></td></tr></table>'; select_to_table($arQ, $args, 0, '99cccc'); echo '<br>'; ?> </body> </html>