6
0
Fork 0

修复当期进货业绩

release
李静 2022-04-01 09:54:53 +08:00
parent b880ddc322
commit 2d46ca1b94
1 changed files with 2 additions and 4 deletions

View File

@ -22,11 +22,9 @@ class CalculatePurchaseAmountOfCurrentPeriod
$tz = now();
if ($tz->day >= 20) {
// 上月20号-当月19号的进货业绩
$startAt = $tz->copy()->subMonthNoOverflow()->setDay(20)->startOfDay();
$startAt = $tz->setDay(20)->startOfDay();
} else {
// 上上月20号-上月19号的进货业绩
$startAt = $tz->copy()->subMonthsNoOverflow(2)->setDay(20)->startOfDay();
$startAt = $tz->subMonthNoOverflow()->setDay(20)->startOfDay();
}
return bcmul($this->calculatePurchaseAmount->handle($dealer, $startAt), '1', 2);