fix(发票数据): 继续处理已到期发票积压 #1509

Closed
yueyang wants to merge 1 commits from fix/yueyang-invoice-backlog-processing into main
2 changed files with 2 additions and 3 deletions

View File

@ -68,7 +68,6 @@ class SyncDingProcessDetailMirror extends Command
if ($businessIds === []
&& ! (bool) $this->option('dry-run')
&& ! (bool) $this->option('skip-invoices')
&& $result['workflows'] > 0
&& (bool) config('ding_invoice_data.sync_with_oa_process', true)) {
try {
$month = $invoiceSync->latestPendingMonth();

View File

@ -114,7 +114,7 @@ class SyncDingProcessDetailMirrorTest extends FeatureTestCase
->assertSuccessful();
}
public function test_oa_sync_skips_invoices_when_no_workflow_changed(): void
public function test_oa_sync_skips_invoice_scan_when_no_backlog_is_due(): void
{
$synchronizer = Mockery::mock(DingProcessDetailMirrorSynchronizer::class);
$synchronizer->shouldReceive('sync')
@ -132,7 +132,7 @@ class SyncDingProcessDetailMirrorTest extends FeatureTestCase
$this->app->instance(DingProcessDetailMirrorSynchronizer::class, $synchronizer);
$invoices = Mockery::mock(DingInvoiceSyncService::class);
$invoices->shouldNotReceive('latestPendingMonth');
$invoices->shouldReceive('latestPendingMonth')->once()->andReturnNull();
$invoices->shouldNotReceive('syncMonth');
$this->app->instance(DingInvoiceSyncService::class, $invoices);