|
|
@@ -55,7 +55,7 @@ class LsCustomController extends Controller
|
|
|
}
|
|
|
if ($debtAmount > 0) {
|
|
|
|
|
|
- echo "shopId:".$shopId." | ".$customName . " customId:" . $customId . " hdId:" . $hdId . " 有欠款 ==== \n\n";
|
|
|
+ echo "shopId:" . $shopId . " | " . $customName . " customId:" . $customId . " hdId:" . $hdId . " 有欠款 ==== \n\n";
|
|
|
|
|
|
$custom = CustomClass::getById($customId, true);
|
|
|
$hd = HdClass::getById($hdId, true);
|
|
|
@@ -72,19 +72,19 @@ class LsCustomController extends Controller
|
|
|
$newBalance = bcsub($balance, $debtAmount, 2);
|
|
|
$custom->balance = $newBalance;
|
|
|
$custom->debtAmount = 0;
|
|
|
- $custom->isDebt =0;
|
|
|
+ $custom->isDebt = 0;
|
|
|
$custom->debtNum = 0;
|
|
|
$custom->save();
|
|
|
|
|
|
$hd->balance = $newBalance;
|
|
|
$hd->debtAmount = 0;
|
|
|
- $hd->debt =1;
|
|
|
+ $hd->debt = 1;
|
|
|
$hd->debtNum = 0;
|
|
|
$hd->save();
|
|
|
|
|
|
$hdName = $hd->name ?? '';
|
|
|
$mainId = $shop['mainId'] ?? 0;
|
|
|
- $event = '系统操作:合并欠款';
|
|
|
+ $event = '系统操作,合并欠款到余额';
|
|
|
$capitalType = dict::getDict('capitalType', 'system', 'id');
|
|
|
$change = [
|
|
|
'customId' => $customId,
|
|
|
@@ -108,7 +108,7 @@ class LsCustomController extends Controller
|
|
|
];
|
|
|
BalanceChangeClass::add($change, true);
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//echo "shopId:".$shopId." | ".$customName . " customId:" . $customId . " hdId:" . $hdId . " 没有欠款 ok ok \n";
|
|
|
}
|
|
|
}
|