siang ,
Spoiler for skrip:
{php}<table>
<tr>
<th>Customer</th>
<th>PO Number</th>
<th>PO Month</th>
<th>Part Number</th>
<th>Part Name</th>
<th>Qty</th>
<th>Resin</th>
<th>Qty (Kg)</th>
<th>Total (Kg)</th>
</tr>
<?php
$results = $conn->query("SELECT PCDS.id,PCDS.qty,MP.part_number,MP.part_name,PO.po_number,PO.customer,
M.name,PO.month,MR.resin,MP.weight_product,MP.weight_runner,MP.cavity
FROM po_customer_add_product PCDS
LEFT JOIN po_customer PO ON PO.id=PCDS.po_customer_id
LEFT JOIN master M ON M.id=PO.customer
LEFT JOIN master_product MP ON MP.id=PCDS.product_id
LEFT JOIN master_resin MR ON MR.id=MP.material_name
Where PCDS.active=1
order by PCDS.po_customer_id ASC");
$prevName = $prevPO = $prevMonth = $prevDo = "";
while($row = $results->fetch_array()) {
$Name = $row['name'];
$PO = $row['po_number'];
$Month = date('F Y',strtotime($row['month']));
$hasilshot = $row['qty']/$row['cavity'];
$weight1shot = ($row['weight_product']*$row['cavity'])+($row['weight_runner']);
$weighttotal = ($weight1shot*$hasilshot)/1000;
if($Name==$prevName) { $Name = ""; } else { $prevName = $Name; }
if($PO==$prevPO) { $PO = ""; } else { $prevPO = $PO; }
if($Month==$prevMonth) { $Month = ""; } else { $prevMonth = $Month; }
echo "<tr>
<td>$Name</td><td>$PO</td><td>$Month</td>
<td>".$row['part_number']."</td>
<td>".$row['part_name']."</td>
<td>".$row['qty']."</td>
<td>".$row['resin']."</td>
<td>".$weighttotal."</td>
<td></td>
</tr>";
} ?>
</table>{/php}
Spoiler for gambar:
pertanyaan :
bagaimana cara menjumlahkan nilai dikotak kiri dan hasilnya dilingkaran kanan ?
terima kasih