« Back to History
yarn_in_stock.php
|
20260721_154032.php
Initial Bulk Import
Copy Code
<?php require_once __DIR__.'/../modules/auth/page_acl.php'; $ctx = page_require_access('yarn_in_boxwise'); $pdo = $ctx['pdo']; $cid = (int)$ctx['company_id']; $yt=$_GET['yarn_type']; $co=$_GET['company']; $de=$_GET['denier']; $cl=$_GET['color']; $mat=$_GET['material']; $st=$pdo->prepare(" SELECT COUNT(*) boxes, SUM(weight) weight FROM yarn_in_boxwise WHERE company_id=? AND material=? AND yarn_type=? AND party_company=? AND denier=? AND color=? "); $st->execute([$cid,$mat,$yt,$co,$de,$cl]); echo json_encode($st->fetch(PDO::FETCH_ASSOC));