*/ $tempSalePerDay = new TempSalePerDay(); $tempSalePerDay->no = $i - 1; $tempSalePerDay->sale_date = Util::mysqlToThaiDate($value['bill_sale_created_date']); $tempSalePerDay->bill_id = $value['bill_sale_id']; $tempSalePerDay->barcode = $value['bill_sale_detail_barcode']; $tempSalePerDay->name = $value['product_name']; $tempSalePerDay->bill_status = $label_bill_status; $tempSalePerDay->price = $value['product_price']; $tempSalePerDay->sale_price = $value['bill_sale_detail_price']; $tempSalePerDay->price_old = $price_old; $tempSalePerDay->bonus_per_unit = $bonus_per_unit; $tempSalePerDay->qty = $value['bill_sale_detail_qty']; $tempSalePerDay->total_bonus = $bonus_per_unit_sum; $tempSalePerDay->total_income = $value['bill_sale_detail_price'] * $value['bill_sale_detail_qty']; $tempSalePerDay->save(); ?> <?php } ?> </tbody> <tfoot> <tr style="background-color: #ddd;"> <td colspan="9" style="text-align: left; padding-right: 10px;"> <span style="font-weight: bold; font-size: 13px;"><?php echo Yii::t('lang', 'sum'); ?> : </span> </td> <td style="text-align: right"></td>