Merge branch 'develop' of gitee.com:zi-chunsheng-e-commerce/mall-server
commit
50d6c5db2b
|
|
@ -22,11 +22,11 @@ class CalculatePurchaseAmountOfCurrentPeriod
|
|||
$tz = now();
|
||||
|
||||
if ($tz->day >= 20) {
|
||||
$startAt = $tz->copy()->setDay(20)->startOfDay();
|
||||
} elseif ($tz->day >= 5) {
|
||||
$startAt = $tz->copy()->setDay(5)->startOfDay();
|
||||
} else {
|
||||
// 上月20号-当月19号的进货业绩
|
||||
$startAt = $tz->copy()->subMonthNoOverflow()->setDay(20)->startOfDay();
|
||||
} else {
|
||||
// 上上月20号-上月19号的进货业绩
|
||||
$startAt = $tz->copy()->subMonthsNoOverflow(2)->setDay(20)->startOfDay();
|
||||
}
|
||||
|
||||
return bcmul($this->calculatePurchaseAmount->handle($dealer, $startAt), '1', 2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue