/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
ajax
/
worker_payment
/
up file
home
<?php session_start(); include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $detail = array(); if ($connection) { // $member_id = mysqli_real_escape_string($connection, $_POST['member_id']); // // $member_id = '8632458728'; $member_id = mysqli_real_escape_string($connection, $_POST['ref_member_id']); $temp_id = explode(".", $member_id); $member_id = bigsara_decode($temp_id[0], $temp_id[1]); $sql_select = "SELECT a.* , (SELECT invoice_number FROM tbl_member_payment WHERE member_id = '$member_id' ) AS invoice_number FROM tbl_member_detail a WHERE member_id = '$member_id' "; $res_select = mysqli_query($connection, $sql_select) or die($connection->error); $row = mysqli_fetch_assoc($res_select); $card_district_id = $row['card_district_id']; $sqlAddressCard = "SELECT `tbl_district`.`district_name_th` , `tbl_amphoe`.`amphoe_name_th` , `tbl_province`.`province_name_th` , `tbl_district`.`district_zipcode` FROM `tbl_district` JOIN `tbl_amphoe` ON `tbl_amphoe`.`amphoe_id` = `tbl_district`.`ref_amphoe` JOIN `tbl_province` ON `tbl_province`.`province_id` = `tbl_amphoe`.`ref_province` WHERE `tbl_district`.`district_id` = '$card_district_id'"; $rsAddressCard = mysqli_query($connection, $sqlAddressCard); $rowAddressCard = mysqli_fetch_array($rsAddressCard); $full_address = $row['card_address'] . " ตำบล" . $rowAddressCard['district_name_th'] . " อำเภอ" . $rowAddressCard['amphoe_name_th'] . " จังหวัด" . $rowAddressCard['province_name_th'] . " " . $rowAddressCard['district_zipcode']; if ($row['member_name'] != "") { $member_name = $row['member_name']; } else { $member_name = $row['member_name_en']; } $member_name = $row['company_name']; $phone = $row['phone']; $card_address = $full_address; $email = $row['email']; $invoice_number = $row['invoice_number']; $receipt_no = getRunNO($size = 4, "REC" . $text = date('y') + 43. . date('m'), 'tbl_receipt_head', 'receipt_no'); $member_id = mysqli_real_escape_string($connection, $_POST['ref_member_id']); $temp_id = explode(".", $member_id); $ref_member_id = bigsara_decode($temp_id[0], $temp_id[1]); $sql = "SELECT pay.invoice_number ,pay.payment_amount ,mem.member_id ,mem.register_no ,mem.ref_member_id ,detail.member_name ,detail.member_name_en FROM tbl_member_payment pay LEFT JOIN tbl_member mem ON mem.member_id = pay.member_id LEFT JOIN tbl_member_detail detail on detail.member_id = mem.member_id WHERE pay.transfer_date IS NULL AND mem.ref_member_id = '$ref_member_id'"; $res = mysqli_query($connection, $sql) or die($connection->error); } ?> <style> #printd .docitem td:nth-child(2) { /* max-width: calc(100% - 520px); */ width: 92px; } /* #printd .docitem td:nth-child(3) { width: 70px; } #printd .docitem td:nth-child(4) { width: 105px; } */ /* #printd .docitem td:nth-child(5) { width: 110px; } #printd .docitem td:nth-child(6) { width: 110px; } #printd .docitem td:nth-child(7) { width: 110px; text-align: right; } */ #printd .docsignature .company_stamp img { position: relative; bottom: auto; } #printd .docitem tfoot td.summary span.c2 { width: 134px; } .label-employer { background: rgba(0, 166, 99); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); } .label-employee { background: rgba(0, 166, 99); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); } .label-worker { background: rgba(5, 230, 185); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); margin: 40px; } .label-company { background: rgba(0, 128, 128); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); margin: 40px; } .modal-xl { max-width: 1200px; } .modal-lg { max-width: 800px; } .modal-l { max-width: 720px; } </style> <div> <div class="row"> <div class="col-6"> <div class="logo"> <img src="../../../img/Logo.png" width="100px"> </div> <div class="company mt-3"> <label class="company_name">สมาคมผู้ประกอบการนำคนต่างด้าวมาทำงานในประเทศ(ประเทศไทย)</label><br> <label>59/28 หมู่ที่ 8 ตำบลท่าทราย อำเภอเมืองสมุทรสาคร จังหวัดสมุทรสาคร 74000</label><br> <label>เลขประจำตัวผู้เสียภาษี 0745561004453</label><br> <label>โทร. 034112568</label><br> </div><!-- .company --> <hr> <div class="customer"> <label class="custom-color">ลูกค้า</label><br> <label class="customer_name"><?php echo $row['company_name']; ?></label><br> <label><?php echo $row['company_address']; ?></label><br> <!-- <p><?php echo $row['customer_address']; ?></p> --> <label>เลขประจำตัวผู้เสียภาษี : <?php echo $row['company_tax_no']; ?></label> <label>โทร : <?php echo $row['company_phone']; ?></label> </div><!-- .company --> </div><!--.l--> <div class="col-6"> <h1 class="document_name custom-color">ใบเสร็จรับเงิน</h1> <div class="about_company"> <table> <tbody> <tr> <td class="custom-color">เลขที่</td> <td><?php echo $receipt_no; ?></td> </tr> <tr> <td class="custom-color">ออก ณ วันที่</td> <td><?php echo date('d/m/Y', strtotime($row_data['receipt_date'])); ?></td> </tr> <tr> <td class="custom-color">ผู้ขาย</td> <td><?php echo $row_data['fullname']; ?></td> </tr> </tbody> </table> </div> <hr> <div class="about_customer"> <table> <tbody> <tr> <td class="custom-color">ผู้ติดต่อ</td> <td><?php echo $row_data['customer_contact_name']; ?></td> </tr> <tr> <td class="custom-color">เบอร์โทร</td> <td><?php echo $row_data['customer_contact_phone']; ?></td> </tr> <tr> <td class="custom-color">อีเมล</td> <td><?php echo $row_data['customer_contact_email']; ?></td> </tr> </tbody> </table> </div> </div> </div><!--.docheader--> <hr> <div class="docitem"> <table class="table"> <thead> <tr> <!-- <td></td> --> <!-- <td>#</td> --> <td>เลขที่ใบสมัคร</td> <td>ชื่อ - นามสกุล</td> <td>ค่าสมัคร</td> </tr> </thead> <tbody> <?php while ($row_mem = mysqli_fetch_assoc($res)) { ?> <tr> <!-- <td><input type="checkbox" class="form-checkbox" id="worker_id" value="<?php echo $row_mem['member_id']; ?>"></td> --> <!-- <td><?php echo $row_mem['invoice_number']; ?></td> --> <td><?php echo $row_mem['register_no']; ?></td> <td><?php echo ($row_mem['member_name'] != '') ? $row_mem['member_name'] : $row_mem['member_name_en'] ?></td> <td><?php echo $row_mem['ref_member_id']; ?></td> <td><?php echo $row_mem['payment_amount']; ?></td> </tr> <?php } ?> </tbody> </table> <hr> <div class="remark ทะขถ"> <p class="custom-color">หมายเหตุ</p> <?php echo $note; ?> </div> </div><!--.docitem--> <div class="row"> <div class="col-6"> <center> <div class="on_behalf_of">ในนาม <?php echo $row_data['customer_name']; ?></div> <div class="clear"> <div class="name"> <span class="l1"></span> <span class="l2">(<?php echo $row_data['customer_name']; ?>)</span> <span class="l3">ผู้สั่งซื้อสินค้า</span> </div> <div class="date"> <span class="l1"></span> <span class="l2">วันที่</span> </div> </div> </center> </div><!--.customer --> <div class="col-6"> <center> <div class="on_behalf_of">ในนาม สมาคมผู้ประกอบการนำคนต่างด้าวมาทำงานในประเทศ(ประเทศไทย)</div> <div class="name"> <span class="l1"> <span class="signature"> </span> </span> <span class="l2"><?php echo ($row_data['fullname'] != "") ? "(" . $row_data['fullname'] . ")" : ""; ?></span> <span class="l3">ผู้ออกเอกสาร</span> </div> <div class="date"> <span class="l1"><span class="approved_date"><?php date('d/m/Y'); ?></span></span> <span class="l2">วันที่</span> </div> </center> </div><!--.company--> </div><!--.docsignature--> </div> <script> $("#data_1 .input-group.date").datepicker({ startView: 0, todayBtn: "linked", keyboardNavigation: false, forceParse: false, autoclose: true, format: "dd/mm/yyyy" }) $(".select2").select2({ width: "100%" }) </script>