mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop
This commit is contained in:
commit
4fca1c58e4
@ -15,6 +15,8 @@ class S3Cleanup extends Command
|
|||||||
*/
|
*/
|
||||||
protected $signature = 'ninja:s3-cleanup';
|
protected $signature = 'ninja:s3-cleanup';
|
||||||
|
|
||||||
|
protected $log = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
*
|
*
|
||||||
|
@ -18,10 +18,10 @@ use App\Libraries\MultiDB;
|
|||||||
use App\Models\ClientContact;
|
use App\Models\ClientContact;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
use Auth;
|
|
||||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class NinjaPlanController extends Controller
|
class NinjaPlanController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -62,9 +62,10 @@ class SupportMessageSent extends Mailable
|
|||||||
$company = auth()->user()->company();
|
$company = auth()->user()->company();
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$db = str_replace("db-ninja-", "", $company->db);
|
$db = str_replace("db-ninja-", "", $company->db);
|
||||||
|
$is_large = $company->is_large ? "L" : "";
|
||||||
|
|
||||||
if(Ninja::isHosted())
|
if(Ninja::isHosted())
|
||||||
$subject = "{$priority}Hosted-{$db}-[{$company->is_large}] :: {$plan} :: ".date('M jS, g:ia');
|
$subject = "{$priority}Hosted-{$db}{$is_large} :: {$plan} :: ".date('M jS, g:ia');
|
||||||
else
|
else
|
||||||
$subject = "{$priority}Self Hosted :: {$plan} :: ".date('M jS, g:ia');
|
$subject = "{$priority}Self Hosted :: {$plan} :: ".date('M jS, g:ia');
|
||||||
|
|
||||||
|
@ -126,6 +126,10 @@ class TemplateEmail extends Mailable
|
|||||||
if($this->invitation->invoice && $settings->ubl_email_attachment && $this->company->account->hasFeature(Account::FEATURE_DOCUMENTS)){
|
if($this->invitation->invoice && $settings->ubl_email_attachment && $this->company->account->hasFeature(Account::FEATURE_DOCUMENTS)){
|
||||||
|
|
||||||
$ubl_string = CreateUbl::dispatchNow($this->invitation->invoice);
|
$ubl_string = CreateUbl::dispatchNow($this->invitation->invoice);
|
||||||
|
|
||||||
|
nlog($ubl_string);
|
||||||
|
|
||||||
|
if($ubl_string)
|
||||||
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
|
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,10 +13,12 @@ namespace App\Models;
|
|||||||
|
|
||||||
use App\Utils\Traits\MakesDates;
|
use App\Utils\Traits\MakesDates;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
class ClientGatewayToken extends BaseModel
|
class ClientGatewayToken extends BaseModel
|
||||||
{
|
{
|
||||||
use MakesDates;
|
use MakesDates;
|
||||||
|
use SoftDeletes;
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'meta' => 'object',
|
'meta' => 'object',
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
namespace App\Notifications;
|
namespace App\Notifications;
|
||||||
|
|
||||||
|
use App\Jobs\Invoice\CreateUbl;
|
||||||
|
use App\Models\Invoice;
|
||||||
use App\Utils\TempFile;
|
use App\Utils\TempFile;
|
||||||
use App\Utils\Traits\MakesInvoiceHtml;
|
use App\Utils\Traits\MakesInvoiceHtml;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
|
@ -205,7 +205,6 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
|
|
||||||
$invoices->each(function ($invoice) use ($payment) {
|
$invoices->each(function ($invoice) use ($payment) {
|
||||||
event(new InvoiceWasPaid($invoice, $payment, $payment->company, Ninja::eventVars()));
|
event(new InvoiceWasPaid($invoice, $payment, $payment->company, Ninja::eventVars()));
|
||||||
$invoice->service()->workFlow();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return $payment->service()->applyNumber()->save();
|
return $payment->service()->applyNumber()->save();
|
||||||
|
@ -60,12 +60,18 @@ use WePayCommon;
|
|||||||
'method' => '1',
|
'method' => '1',
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
||||||
'client_id' => config('ninja.wepay.client_id'),
|
'client_id' => config('ninja.wepay.client_id'),
|
||||||
'client_secret' => config('ninja.wepay.client_secret'),
|
'client_secret' => config('ninja.wepay.client_secret'),
|
||||||
'credit_card_id' => (int)$data['credit_card_id'],
|
'credit_card_id' => (int)$data['credit_card_id'],
|
||||||
));
|
));
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(\Exception $e){
|
||||||
|
return $this->wepay_payment_driver->processInternallyFailedPayment($this->wepay_payment_driver, $e);
|
||||||
|
}
|
||||||
// display the response
|
// display the response
|
||||||
// nlog($response);
|
// nlog($response);
|
||||||
|
|
||||||
@ -116,11 +122,16 @@ use WePayCommon;
|
|||||||
{
|
{
|
||||||
nlog("authorize the card first!");
|
nlog("authorize the card first!");
|
||||||
|
|
||||||
|
try {
|
||||||
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
||||||
'client_id' => config('ninja.wepay.client_id'),
|
'client_id' => config('ninja.wepay.client_id'),
|
||||||
'client_secret' => config('ninja.wepay.client_secret'),
|
'client_secret' => config('ninja.wepay.client_secret'),
|
||||||
'credit_card_id' => (int)$request->input('credit_card_id'),
|
'credit_card_id' => (int)$request->input('credit_card_id'),
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
catch(\Exception $e){
|
||||||
|
return $this->wepay_payment_driver->processInternallyFailedPayment($this->wepay_payment_driver, $e);
|
||||||
|
}
|
||||||
|
|
||||||
$credit_card_id = (int)$response->credit_card_id;
|
$credit_card_id = (int)$response->credit_card_id;
|
||||||
|
|
||||||
|
@ -63,8 +63,8 @@ class TriggeredActions extends AbstractService
|
|||||||
private function sendEmail()
|
private function sendEmail()
|
||||||
{
|
{
|
||||||
|
|
||||||
//$reminder_template = $this->invoice->calculateTemplate('invoice');
|
$reminder_template = $this->invoice->calculateTemplate('invoice');
|
||||||
$reminder_template = 'payment';
|
//$reminder_template = 'payment';
|
||||||
|
|
||||||
$this->invoice->invitations->load('contact.client.country', 'invoice.client.country', 'invoice.company')->each(function ($invitation) use ($reminder_template) {
|
$this->invoice->invitations->load('contact.client.country', 'invoice.client.country', 'invoice.company')->each(function ($invitation) use ($reminder_template) {
|
||||||
EmailEntity::dispatch($invitation, $this->invoice->company, $reminder_template);
|
EmailEntity::dispatch($invitation, $this->invoice->company, $reminder_template);
|
||||||
|
@ -83,6 +83,7 @@ class UpdateInvoicePayment
|
|||||||
->updatePaidToDate($paid_amount)
|
->updatePaidToDate($paid_amount)
|
||||||
->updateStatus()
|
->updateStatus()
|
||||||
->deletePdf()
|
->deletePdf()
|
||||||
|
->workFlow()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||||
|
@ -36,7 +36,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 55%;
|
height: 100%;
|
||||||
|
padding-right: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#company-details,
|
#company-details,
|
||||||
@ -252,6 +253,10 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo-container {
|
||||||
|
max-height: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
/** Useful snippets, uncomment to enable. **/
|
/** Useful snippets, uncomment to enable. **/
|
||||||
|
|
||||||
/** Hide company logo **/
|
/** Hide company logo **/
|
||||||
@ -288,7 +293,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="header-wrapper" id="header">
|
<div class="header-wrapper" id="header">
|
||||||
|
<div class="logo-container">
|
||||||
<img class="company-logo" src="$company.logo" alt="$company.name logo"/>
|
<img class="company-logo" src="$company.logo" alt="$company.name logo"/>
|
||||||
|
</div>
|
||||||
<div id="company-details"></div>
|
<div id="company-details"></div>
|
||||||
<div id="company-address"></div>
|
<div id="company-address"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user