Commit e57773ea authored by chenzq's avatar chenzq

股东修改

parent 3cb3b19f
...@@ -9831,11 +9831,13 @@ class longbing_companyModuleWxapp extends WeModuleWxapp ...@@ -9831,11 +9831,13 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
if ($user['pid'] && $config['first_extract']) { if ($user['pid'] && $config['first_extract']) {
$check_first = pdo_get('longbing_company_selling_profit', array('user_id' => $user['pid'])); $check_first = pdo_get('longbing_company_selling_profit', array('user_id' => $user['pid']));
$staff = pdo_get('longbing_company_user', array('id' => $user['pid']));
if (!$check_first) { if (!$check_first) {
@pdo_insert('longbing_company_selling_profit', array('user_id' => $user['pid'], 'uniacid' => $uniacid, 'create_time' => $time, 'update_time' => $time)); @pdo_insert('longbing_company_selling_profit', array('user_id' => $user['pid'], 'uniacid' => $uniacid, 'create_time' => $time, 'update_time' => $time));
} }
if($staff['is_stock']==1&&$config['first_extract']&&$config['first_extract']>0&&$config['first_extract']<100){
$config['first_extract']=$config['stock_extract'];
}
$extract_money_first = $price * $config['first_extract'] / 100; $extract_money_first = $price * $config['first_extract'] / 100;
$extract_money_first = sprintf('%.2f', $extract_money_first); $extract_money_first = sprintf('%.2f', $extract_money_first);
@pdo_update('longbing_company_selling_profit', array('waiting +=' => $extract_money_first), array('user_id' => $user['pid'])); @pdo_update('longbing_company_selling_profit', array('waiting +=' => $extract_money_first), array('user_id' => $user['pid']));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment