mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 07:57:33 -05:00 
			
		
		
		
	Fixes for base driver
This commit is contained in:
		
							parent
							
								
									1ee6e33bb7
								
							
						
					
					
						commit
						c67fee3fff
					
				@ -47,6 +47,8 @@ class StoreDesignRequest extends Request
 | 
				
			|||||||
            $input['design']['task'] = '';
 | 
					            $input['design']['task'] = '';
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $input['design'] = htmlspecialchars($input['design']);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        $this->replace($input);
 | 
					        $this->replace($input);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -37,7 +37,7 @@ class RecurringInvoicesCron
 | 
				
			|||||||
    public function handle() : void
 | 
					    public function handle() : void
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        /* Get all invoices where the send date is less than NOW + 30 minutes() */
 | 
					        /* Get all invoices where the send date is less than NOW + 30 minutes() */
 | 
				
			||||||
        info("Sending recurring invoices {Carbon::now()->format('Y-m-d h:i:s')}");
 | 
					        info("Sending recurring invoices ".Carbon::now()->format('Y-m-d h:i:s'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (! config('ninja.db.multi_db_enabled')) {
 | 
					        if (! config('ninja.db.multi_db_enabled')) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,7 @@ use App\Events\Invoice\InvoiceWasPaid;
 | 
				
			|||||||
use App\Factory\PaymentFactory;
 | 
					use App\Factory\PaymentFactory;
 | 
				
			||||||
use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest;
 | 
					use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest;
 | 
				
			||||||
use App\Models\Client;
 | 
					use App\Models\Client;
 | 
				
			||||||
 | 
					use App\Models\ClientContact;
 | 
				
			||||||
use App\Models\ClientGatewayToken;
 | 
					use App\Models\ClientGatewayToken;
 | 
				
			||||||
use App\Models\CompanyGateway;
 | 
					use App\Models\CompanyGateway;
 | 
				
			||||||
use App\Models\Invoice;
 | 
					use App\Models\Invoice;
 | 
				
			||||||
@ -192,4 +193,21 @@ class BaseDriver extends AbstractPaymentDriver
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Return the contact if possible.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return ClientContact The ClientContact object
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function getContact()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if ($this->invitation) {
 | 
				
			||||||
 | 
					            return ClientContact::find($this->invitation->client_contact_id);
 | 
				
			||||||
 | 
					        } elseif (auth()->guard('contact')->user()) {
 | 
				
			||||||
 | 
					            return auth()->user();
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user