进货业绩每月20号结算
parent
b2ef9cbc3f
commit
161478fdca
|
|
@ -56,17 +56,13 @@ class PurchaseSubsidySettleCommand extends Command
|
|||
$tz = now();
|
||||
|
||||
if ($tz->day >= 20) {
|
||||
// 结算当月5号-19号的管理津贴
|
||||
$startAt = $tz->copy()->setDay(5)->startOfDay();
|
||||
// 上月20号-当月19号的进货业绩
|
||||
$startAt = $tz->copy()->subMonthNoOverflow()->setDay(20)->startOfDay();
|
||||
$endAt = $tz->copy()->setDay(19)->endOfDay();
|
||||
} elseif ($tz->day >= 5) {
|
||||
// 结算上月20号-到当月4号的管理津贴
|
||||
$startAt = $tz->copy()->subMonthNoOverflow()->set('day', 20)->startOfDay();
|
||||
$endAt = $tz->copy()->set('day', 4)->endOfDay();
|
||||
} else {
|
||||
// 结算上月5号-到19号的管理津贴
|
||||
$startAt = $tz->copy()->subMonthNoOverflow()->setDay(5)->startOfDay();
|
||||
$endAt = $startAt->copy()->setDay(19)->endOfDay();
|
||||
// 上上月20号-上月19号的进货业绩
|
||||
$startAt = $tz->copy()->subMonthsNoOverflow(2)->setDay(20)->startOfDay();
|
||||
$endAt = $tz->copy()->subMonthNoOverflow()->setDay(19)->endOfDay();
|
||||
}
|
||||
|
||||
$head = '【'.$startAt->format('Y/m/d').'-'.$endAt->format('Y/m/d').'】';
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class Kernel extends ConsoleKernel
|
|||
->runInBackground();
|
||||
|
||||
$schedule->command('dealer:purchase-subsidy-settle')
|
||||
->twiceMonthly(5, 20, '3:00')
|
||||
->twiceMonthly(20, '3:00')
|
||||
->runInBackground();
|
||||
|
||||
$schedule->command('dealer:manager-subsidy-settle')
|
||||
|
|
|
|||
Loading…
Reference in New Issue