|
|
@ -26,7 +26,7 @@ if (!empty($_GET['check'])) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$sql = "SELECT * FROM bonus WHERE 1=1 $clause "; |
|
|
|
$sql = "SELECT * FROM bonus WHERE 1=1 $clause LIMIT 50"; |
|
|
|
$stmt = $conn->prepare($sql); |
|
|
|
$stmt->execute(); |
|
|
|
$datas = $stmt->fetchAll(PDO::FETCH_ASSOC); |
|
|
@ -52,7 +52,7 @@ LEFT JOIN salIncomeApplyMaster as b ON a.BillNo = b.BillNo |
|
|
|
LEFT JOIN ( |
|
|
|
SELECT aMaster.BillNo,aMaster.BizPartnerId,aDetail.CU_MaterialId FROM arCheckBill as aMaster |
|
|
|
LEFT JOIN arCheckBillDetail as aDetail ON aMaster.BizPartnerId = aDetail.FromBillNo |
|
|
|
WHERE aMaster.BizPartnerId = 'Q23080067' AND aMaster.TypeId = 'RVS' |
|
|
|
WHERE aMaster.BizPartnerId = '$contract_no' AND aMaster.TypeId = 'RVS' |
|
|
|
) AS c ON a.BillNo = c.BizPartnerId |
|
|
|
WHERE a.BillNo = '$contract_no' |
|
|
|
AND a.RowNo = '1' |
|
|
@ -123,10 +123,10 @@ WHERE c.checkBillNo = '$checkBillNo' |
|
|
|
<th>牌價</th> |
|
|
|
<th>服務費</th> |
|
|
|
<th>應發人員</th> |
|
|
|
<th>發放時間</th> |
|
|
|
<th>應發金額</th> |
|
|
|
<th>預計發放時間</th> |
|
|
|
<th>獎金水庫</th> |
|
|
|
<!-- <th>是否發放</th> --> |
|
|
|
<th>是否收款</th> |
|
|
|
<th>狀態</th> |
|
|
|
<th>檢視/發放</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
@ -140,6 +140,7 @@ WHERE c.checkBillNo = '$checkBillNo' |
|
|
|
$total = empty($json->total) ? 0 : $json->total; |
|
|
|
$fee_per_st = empty($json->fee_per_st) ? 0 : $json->fee_per_st; |
|
|
|
$commission_fee = empty($json->commission_fee) ? 0 : $json->commission_fee; |
|
|
|
$isPay = isPay($data['contract_no'], $connT8); |
|
|
|
|
|
|
|
?> |
|
|
|
<tr> |
|
|
@ -158,21 +159,21 @@ WHERE c.checkBillNo = '$checkBillNo' |
|
|
|
<!-- <td><?= ($data['status'] == 1) ? '未發放' : '已發放' ?></td> --> |
|
|
|
<td> |
|
|
|
<!-- <input type="text" x-model="isPays[<?php echo $key; ?>]" /> --> |
|
|
|
<!-- <span><?= ($isPay == 1) ? '已收款' : '未收款' ?></span> --> |
|
|
|
<span><?= ($isPay == 1) ? '已收款' : '未收款' ?></span> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<?php |
|
|
|
// 判斷時間是否為一個月內 |
|
|
|
$payday = new DateTime($data['pay_day']); |
|
|
|
// if ($isPay == 1) { |
|
|
|
if ($isPay == 1) { |
|
|
|
?> |
|
|
|
<!-- <a href="bonus_detail.php?id=<?= $data['id'] ?>&token=<?php echo $token; ?>" class="applybtn" style="">發放獎金</a> --> |
|
|
|
<a href="bonus_detail.php?id=<?= $data['id'] ?>&token=<?php echo $token; ?>" class="applybtn" style="">發放獎金</a> |
|
|
|
<?php |
|
|
|
// } else if ($payday < $oneMonthAgo) { |
|
|
|
} else if ($payday < $oneMonthAgo) { |
|
|
|
?> |
|
|
|
<a href="bonus_detail.php?id=<?= $data['id'] ?>&token=<?php echo $token; ?>" class="applybtncheck">查看詳情</a> |
|
|
|
<?php |
|
|
|
// } |
|
|
|
} |
|
|
|
?> |
|
|
|
</td> |
|
|
|
|
|
|
|