|
@@ -39,7 +39,7 @@ class CheckInvoice extends Command
|
|
|
'fully_digitalized_normal_electronic'=>'022',
|
|
|
];
|
|
|
$this->output=$output;
|
|
|
- if(Cache::get('checkInvoiceP')==1)return;
|
|
|
+ // if(Cache::get('checkInvoiceP')==1)return;
|
|
|
while ($list->valid()){
|
|
|
Cache::set('checkInvoiceP',1,1800);
|
|
|
$invoice = $list->current();
|
|
@@ -52,14 +52,13 @@ class CheckInvoice extends Command
|
|
|
}
|
|
|
|
|
|
protected function getInvoice(){
|
|
|
- $list = Invoice::where([['status','=',0],['open_time','<',$this->datetime],['updatetime','<=',date('Y-m-d H:i:s')]])->cursor();
|
|
|
+ $list = Invoice::where([['status','=',0],['updatetime','<=',date('Y-m-d H:i:s')]])->cursor();
|
|
|
foreach ($list as $item){
|
|
|
yield $item;
|
|
|
}
|
|
|
}
|
|
|
protected function taxCheck($invoice){
|
|
|
- $iinvoicenfo=env('tax');
|
|
|
- $Tax =new \TaxInvoice($iinvoicenfo['appkey'],$iinvoicenfo['appsecret'],$invoice['entcode']);
|
|
|
+ $Tax =new \TaxInvoice(env('tax.appkey'),env('tax.appsecret'),env('tax.entcode'));
|
|
|
|
|
|
$invNum= $this->InvoiceNum[$invoice['invoice_type']];
|
|
|
$subtotal= $invoice['invoice_subtotal'];
|