load microsoft .js if client_id is set
This commit is contained in:
parent
f4b98b552c
commit
6d40c7da83
|
|
@ -72,6 +72,12 @@ class EmailController extends BaseController
|
|||
$user = auth()->user();
|
||||
$company = $entity_obj->company;
|
||||
|
||||
/** Force AEAT Submission */
|
||||
if($company->verifactuEnabled() && $entity_obj instanceof Invoice && $entity_obj->backup->guid == "") {
|
||||
$entity_obj->service()->sendVerifactu();
|
||||
return $this->itemResponse($entity_obj->fresh());
|
||||
}
|
||||
|
||||
if ($request->cc_email && (Ninja::isSelfHost() || $user->account->isPremium())) {
|
||||
|
||||
foreach ($request->cc_email as $email) {
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ class Verifactu extends AbstractService
|
|||
$nif = $log->nif;
|
||||
$invoiceNumber = $log->invoice_number;
|
||||
$date = $log->date->format('d-m-Y');
|
||||
$total = round($log->invoice->amount, 2);
|
||||
$total = (string)round($log->invoice->amount, 2);
|
||||
|
||||
$url = sprintf(
|
||||
$this->aeat_client->base_qr_url,
|
||||
|
|
@ -212,10 +212,9 @@ class Verifactu extends AbstractService
|
|||
urlencode($nif),
|
||||
urlencode($invoiceNumber),
|
||||
urlencode($date),
|
||||
urlencode((string) $total)
|
||||
urlencode($total)
|
||||
);
|
||||
|
||||
|
||||
$result = Builder::create()
|
||||
->writer(new PngWriter())
|
||||
->data($url)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ return [
|
|||
],
|
||||
|
||||
'microsoft' => [
|
||||
'client_id' => env('MICROSOFT_CLIENT_ID',''),
|
||||
'client_id' => env('MICROSOFT_CLIENT_ID',false),
|
||||
'client_secret' => env('MICROSOFT_CLIENT_SECRET'),
|
||||
'redirect' => env('MICROSOFT_REDIRECT_URI'),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -8,17 +8,21 @@
|
|||
<meta name="google-signin-client_id" content="{{ config('services.google.client_id') }}">
|
||||
<link rel="manifest" href="manifest.json?v={{ config('ninja.app_version') }}">
|
||||
<script src="{{ asset('js/pdf.min.js') }}"></script>
|
||||
|
||||
@if(config('services.microsoft.client_id'))
|
||||
<!-- Microsoft OAuth library -->
|
||||
<script type="text/javascript"
|
||||
src="https://alcdn.msauth.net/browser/2.14.2/js/msal-browser.min.js"
|
||||
integrity="sha384-ggh+EF1aSqm+Y4yvv2n17KpurNcZTeYUZUvhPziElsstmIEubyEB6AIVpKLuZgr"
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@if(\App\Utils\Ninja::isHosted())
|
||||
|
||||
<!-- Apple OAuth Library -->
|
||||
<script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script>
|
||||
|
||||
<!-- Microsoft OAuth library -->
|
||||
<script type="text/javascript"
|
||||
src="https://alcdn.msauth.net/browser/2.14.2/js/msal-browser.min.js"
|
||||
integrity="sha384-ggh+EF1aSqm+Y4yvv2n17KpurNcZTeYtUZUvhPziElsstmIEubyEB6AIVpKLuZgr"
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
|
||||
<!-- G Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
|
|
|
|||
Loading…
Reference in New Issue