Star Bonus Bug mostly is because the Star_Bonus_Paid remark put on column star_bonus_paid on tbl_product_order in database.
Example, page Confirm_add_star_bonus.php
$query3 = "SELECT user_id, id, package_amount, approved_on FROM tbl_flamingo_product_order
WHERE user_id = $userid
&& star_bonus_paid =0
&& status=3 ";
$result3 = $this->db->query($query3);
$rows3 = $result3->result_array();
foreach ($rows3 as $row3)
{
$package_size = $row3['package_amount'];
$individu_total_package_size = $individu_total_package_size + $package_size; //for total up 2 packages of Chin Yoke Lan
}
if($individu_total_package_size >= 10)
{
//payout star bonus
//bug here, $individu_total_package_size == 0 is because star_bonus_paid = 1 already.
//company payout total 20% of star bonus, but when 5% star bonus payout, package already got remark star_bonus_paid = 1, so the balance of 15% won't be paid out. It is bug.
}
?>
--------------------------------------------
Star Bonus confirm button function bug :
Bug :
formula is
usd1500 package size * 5% bonus rate - 3% bonus rate paid = 2%;
you insert star_bonus_paid 2% into database. So when loop to next downline, it become :
usd1500 package size * 2% paid last time - 5% bonus rate - 3% bonus rate paid = 0%;
that's why you should not insert star_bonus_paid into database before all downlines get credit in wallet. It mean u should put in the code of insert star_bonus_paid into database at the most bottom of the page (mostly at Company payout Total there).
----------------------------------------------
There are two difference recursive loop for 2 difference DSB payout :
1) direct sponsor bonus payout immediately on new package order :
recursive loop at function direct_sponsor_bonus_payout_immediately()
2) direct sponsor bonus payout generated by admin manually :
recursive loop at function loop_get_three_uplines()
Posted by Zac1987 on
05 April, 2020
0 comments