<th rowspan="2"><div align="center">ชื่อสินค้า</div></th> <th rowspan="2"><div align="center">จำนวน</div></th> <th colspan="3"><div align="center">ราคาคืน/หน่วย</div></th> <th colspan="2"><div align="center">ราคาคืน</div></th> </tr> <tr> <th><div align="center">ราคาเปิด</div></th> <th><div align="center">คืนลด</div></th> <th><div align="center">ราคาคืน</div></th> <th><div align="center">ราคาเปิดรวม</div></th> <th><div align="center">ราคาคืนรวม</div></th> </tr> </thead> <tbody> <?php $getProductRefundByID = getProductRefundByID($idshop, $idshipment_period); $i2 = 0; $refund = 0; $sum_refund = 0; foreach ($getProductRefundByID as $value) { $i2++; $val_idfactory = $value['idfactory']; $val_name_factory = $value['name_factory']; $val_name_product = $value['name_product']; $val_price_unit = $value['price_unit']; $val_amount_product_refunds = $value['amount_product_refunds']; $val_name_unit = $value['name_unit']; $val_date_product_refunds = $value['date_product_refunds']; $date_product_refunds = date_create($val_date_product_refunds); $date_product_refunds->add(new DateInterval('P543Y0M0DT0H0M0S')); $val_price_difference = $value['difference_product_refunds'];
<div class="table-responsive"> <table class="table table-striped table-bordered table-hover text-center "> <thead> <tr> <th><div align="center">ลำดับ</div></th> <th><div align="center">วันที่คืน</div></th> <th><div align="center">โรงงาน</div></th> <th><div align="center">ชื่อสินค้า</div></th> <th><div align="center">จำนวน</div></th> <th><div align="center">ราคาคืน/หน่วย</div></th> <th><div align="center">ราคาคืน</div></th> </tr> </thead> <tbody> <?php $getProductRefundByID = getProductRefundByID($idshop, $val_before_idshipment_period); $i2 = 0; $refund = 0; $sum_refund = 0; foreach ($getProductRefundByID as $value) { $i2++; $val_idfactory = $value['idfactory']; $val_name_factory = $value['name_factory']; $val_name_product = $value['name_product']; $val_price_unit = $value['price_unit']; $val_amount_product_refunds = $value['amount_product_refunds']; $val_name_unit = $value['name_unit']; $val_date_product_refunds = $value['date_product_refunds']; $date_product_refunds = date_create($val_date_product_refunds); $date_product_refunds->add(new DateInterval('P543Y0M0DT0H0M0S')); $val_price_difference = $value['difference_product_refunds'];