Browse Source

记账时,如果金额为0则不记账

master
weigang 5 years ago
parent
commit
65818173ad
  1. 6
      app/Service/v3/Implementations/FinancialRecordService.php

6
app/Service/v3/Implementations/FinancialRecordService.php

@ -32,6 +32,12 @@ class FinancialRecordService implements FinancialRecordServiceInterface
public function record($user_id, $record, $isLedger=false)
{
// 如果金额不存在或者金额为0时,不记账
if (!isset($record['money']) || !boolval($record['money'])) {
return true;
}
$financialRecord = new FinancialRecord();
if (!$isLedger) {

Loading…
Cancel
Save