mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 06:07:33 -05:00 
			
		
		
		
	Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
		
						commit
						280a485a84
					
				@ -99,6 +99,8 @@ class InvoiceController extends BaseController
 | 
			
		||||
            ->where('invitations.deleted_at', '=', null)
 | 
			
		||||
            ->select('contacts.public_id')->lists('public_id');
 | 
			
		||||
 | 
			
		||||
        $clients = Client::scope()->withTrashed()->with('contacts', 'country');
 | 
			
		||||
 | 
			
		||||
        if ($clone) {
 | 
			
		||||
            $invoice->id = $invoice->public_id = null;
 | 
			
		||||
            $invoice->invoice_number = $account->getNextInvoiceNumber($invoice);
 | 
			
		||||
@ -111,6 +113,7 @@ class InvoiceController extends BaseController
 | 
			
		||||
            Utils::trackViewed($invoice->getDisplayName().' - '.$invoice->client->getDisplayName(), $invoice->getEntityType());
 | 
			
		||||
            $method = 'PUT';
 | 
			
		||||
            $url = "{$entityType}s/{$publicId}";
 | 
			
		||||
            $clients->whereId($invoice->client_id);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date);
 | 
			
		||||
@ -157,7 +160,7 @@ class InvoiceController extends BaseController
 | 
			
		||||
        $lastSent = ($invoice->is_recurring && $invoice->last_sent_date) ? $invoice->recurring_invoices->last() : null;
 | 
			
		||||
 | 
			
		||||
        $data = array(
 | 
			
		||||
                'clients' => Client::scope()->withTrashed()->with('contacts', 'country')->whereId($invoice->client_id)->get(),
 | 
			
		||||
                'clients' => $clients->get(),
 | 
			
		||||
                'entityType' => $entityType,
 | 
			
		||||
                'showBreadcrumbs' => $clone,
 | 
			
		||||
                'invoice' => $invoice,
 | 
			
		||||
 | 
			
		||||
@ -101,7 +101,9 @@ class PublicClientController extends BaseController
 | 
			
		||||
        // Checkout.com requires first getting a payment token
 | 
			
		||||
        $checkoutComToken = false;
 | 
			
		||||
        $checkoutComKey = false;
 | 
			
		||||
        $checkoutComDebug = false;
 | 
			
		||||
        if ($accountGateway = $account->getGatewayConfig(GATEWAY_CHECKOUT_COM)) {
 | 
			
		||||
            $checkoutComDebug = $accountGateway->getConfigField('testMode');
 | 
			
		||||
            if ($checkoutComToken = $this->paymentService->getCheckoutComToken($invitation)) {
 | 
			
		||||
                $checkoutComKey = $accountGateway->getConfigField('publicApiKey');
 | 
			
		||||
                $invitation->transaction_reference = $checkoutComToken;
 | 
			
		||||
@ -126,6 +128,7 @@ class PublicClientController extends BaseController
 | 
			
		||||
            'paymentURL' => $paymentURL,
 | 
			
		||||
            'checkoutComToken' => $checkoutComToken,
 | 
			
		||||
            'checkoutComKey' => $checkoutComKey,
 | 
			
		||||
            'checkoutComDebug' => $checkoutComDebug,
 | 
			
		||||
            'phantomjs' => Input::has('phantomjs'),
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -41,7 +41,7 @@ class AccountGatewayService extends BaseService
 | 
			
		||||
            [
 | 
			
		||||
                'name',
 | 
			
		||||
                function ($model) {
 | 
			
		||||
                    return link_to("gateways/{$model->public_id}/edit", $model->name);
 | 
			
		||||
                    return link_to("gateways/{$model->public_id}/edit", $model->name)->toHtml();
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            [
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,13 @@
 | 
			
		||||
<script src="https://sandbox.checkout.com/js/v1/checkout.js"></script>
 | 
			
		||||
@if ($checkoutComDebug)
 | 
			
		||||
    <script src="https://sandbox.checkout.com/js/v1/checkout.js"></script>
 | 
			
		||||
@else
 | 
			
		||||
    <script src="https://cdn.checkout.com/js/checkout.js"></script>
 | 
			
		||||
@endif
 | 
			
		||||
 | 
			
		||||
<form method="POST" class="payment-form">
 | 
			
		||||
    <script>
 | 
			
		||||
        Checkout.render({
 | 
			
		||||
            debugMode: true,
 | 
			
		||||
            debugMode: {{ $checkoutComDebug ? 'true' : 'false' }},
 | 
			
		||||
            publicKey: '{{ $checkoutComKey }}',
 | 
			
		||||
            paymentToken: '{{ $checkoutComToken }}',
 | 
			
		||||
            customerEmail: '{{ $contact->email }}',
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,9 @@ class TaxRatesCest
 | 
			
		||||
        $total = $itemCost;
 | 
			
		||||
        $total += round($itemCost * $itemTaxRate / 100, 2);
 | 
			
		||||
        $total += round($itemCost * $invoiceTaxRate / 100, 2);
 | 
			
		||||
        
 | 
			
		||||
        $itemTaxRate = number_format($itemTaxRate, 2);
 | 
			
		||||
        $invoiceTaxRate = number_format($invoiceTaxRate, 2);
 | 
			
		||||
 | 
			
		||||
        // create tax rates
 | 
			
		||||
        $I->amOnPage('/tax_rates/create');
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user