prepare("SELECT t.StoreName, o.ProductId, o.FormUsed, o.ProductName, o.Name, o.Number, o.Size, o.JerseySize, o.ShortsSize, o.Price, o.Quantity, (o.Price * o.Quantity) AS TotalPrice, ((o.Price * o.Quantity) * 0.10) AS Tax,
o.DateCreated, pd.InvoiceNumber, pd.Payer_Email FROM orders AS o
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
INNER JOIN teamstores AS t ON t.Id = o.StoreId
WHERE o.DateCreated BETWEEN '$date 00:00:00' AND '$date 23:59:00'
ORDER BY o.DateCreated ASC, o.Number ASC");
$q->execute();
$result = $q->fetchAll();
return $result;
}
function getItemImages($pid){
include 'dbconfig.php';
$q = $conn->prepare("SELECT * FROM teamstore_product_thumbnails WHERE ProductId = :pid ORDER BY Ordering ASC");
$q->execute(array(':pid'=>$pid));
$result = $q->fetchAll();
return $result;
}
$array_orders = getSubItem($dateToday);
// var_dump(getItemImages(88));
?>
| |
Daily Reports
prepare("SELECT t.StoreName, o.ProductId, o.FormUsed, o.ProductName, o.NAME, o.NUMBER, o.Size, o.JerseySize, o.ShortsSize, o.Price, o.Quantity, (o.Price * o.Quantity) AS TotalPrice, ((o.Price * o.Quantity) * 0.10) AS Tax,
o.DateCreated, pd.InvoiceNumber, pd.Payer_Email FROM orders AS o
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
INNER JOIN teamstores AS t ON t.Id = o.StoreId
WHERE o.DateCreated BETWEEN '$dateToday 00:00:00' AND '$dateToday 23:59:00'
GROUP BY o.ProductId
ORDER BY o.DateCreated");
$q->execute();
$result = $q->rowCount();
if($result > 0){
// $i = 1;
while ($row = $q->fetch()) {
?>
Store:
|
|
$thumb_val){
// echo $thumb_val['Image'];
echo '  ';
}
?>
| # |
Name |
Number |
Jersey Size |
Shorts Size |
Quantity |
| # |
Size |
Quantity |
| Quantity |
| # |
Name |
Number |
Quantity |
| # |
Name |
Number |
Size |
Quantity |
| # |
Number |
Quantity |
| # |
Name |
Size |
Quantity |
| # |
Jersey Size |
Shorts Size |
Quantity |
$val){
if($val['ProductId'] == $row['ProductId']){
if($row['FormUsed']=="jersey-and-shorts-form"){
?>
|
|
|
|
|
|
|
| |
|
|
| |
|
| |
|
|
|
| |
|
|
|
|
| |
|
|
| |
|
|
|
| |
|
|
|
|
|
|
|
|