added qr on reports

This commit is contained in:
franknstayn
2020-10-31 21:32:01 +08:00
parent ef38abb794
commit 1d063608a0
3 changed files with 21 additions and 5 deletions

View File

@@ -68,7 +68,6 @@ class AdminController extends Controller
$item_thumbs = $AdminModel->selectDisplayItemThumb();
$array_payment_details = $AdminModel->selectPaymentDetails('CartKey', $ck);
$array_shipping_add = $AdminModel->selectShippingAddress('PaymentDetail_Id', $array_payment_details[0]->Id);
return view('admin_pages.print_order')
->with('array_payment_details', $array_payment_details)
->with('img_thumb', $item_thumbs)

View File

@@ -38,7 +38,7 @@ class AdminModel extends Model
function itemGroup($cartKey){
$pdo = DB::connection()->getPdo();
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, Price * SUM(Quantity) AS total_price FROM orders WHERE CartKey = :ck GROUP BY ProductId");
$query = $pdo->prepare("SELECT orders.*, COUNT(orders.Id) AS qty, orders.Price * SUM(orders.Quantity) AS total_price, teamstores.StoreName FROM orders LEFT JOIN teamstores on teamstores.Id = orders.StoreId WHERE CartKey = :ck GROUP BY ProductId");
$query->execute([':ck'=>$cartKey]);
$row = $query->fetchAll(\PDO::FETCH_OBJ);
return $row;