diff --git a/app/Import/Transformer/Freshbooks/InvoiceTransformer.php b/app/Import/Transformer/Freshbooks/InvoiceTransformer.php index c58cf8271b..ab33159b62 100644 --- a/app/Import/Transformer/Freshbooks/InvoiceTransformer.php +++ b/app/Import/Transformer/Freshbooks/InvoiceTransformer.php @@ -85,11 +85,11 @@ class InvoiceTransformer extends BaseTransformer return ($record[$field] / $record['Line Subtotal']) * 100; } - $tax_amount1 = isset($record['Tax 1 Amount']) ? $record['Tax 1 Amount'] : 0; + $tax_amount1 = isset($record['Tax 1 Amount']) ? floatval($record['Tax 1 Amount']) : 0; - $tax_amount2 = isset($record['Tax 2 Amount']) ? $record['Tax 2 Amount'] : 0; + $tax_amount2 = isset($record['Tax 2 Amount']) ? floatval($record['Tax 2 Amount']) : 0; - $line_total = isset($record['Line Total']) ? $record['Line Total'] : 0; + $line_total = isset($record['Line Total']) ? floatval($record['Line Total']) : 0; $subtotal = $line_total - $tax_amount2 - $tax_amount1; diff --git a/app/Jobs/Invoice/InvoiceCheckOverdue.php b/app/Jobs/Invoice/InvoiceCheckOverdue.php index 240422d481..695110c35b 100644 --- a/app/Jobs/Invoice/InvoiceCheckOverdue.php +++ b/app/Jobs/Invoice/InvoiceCheckOverdue.php @@ -186,8 +186,6 @@ class InvoiceCheckOverdue implements ShouldQueue continue; } - nlog($company_user->permissions); - $overdue_invoices_collection = $overdue_invoices; $invoice = Invoice::withTrashed()->find($overdue_invoices[0]['id']); @@ -205,7 +203,7 @@ class InvoiceCheckOverdue implements ShouldQueue $overdue_invoices_collection = collect($overdue_invoices) ->filter(function ($overdue_invoice) use ($user) { $invoice = Invoice::withTrashed()->find($overdue_invoice['id']); - nlog([$invoice->user_id, $user->id, $invoice->assigned_user_id, $user->id]); + // nlog([$invoice->user_id, $user->id, $invoice->assigned_user_id, $user->id]); return $invoice->user_id == $user->id || $invoice->assigned_user_id == $user->id; }) ->toArray(); @@ -243,6 +241,7 @@ class InvoiceCheckOverdue implements ShouldQueue /** * Send notifications for an overdue invoice to all relevant company users. + * @deprecated in favour of sendOverdueNotifications to send a summary email to all users */ /** @phpstan-ignore-next-line */ private function notifyOverdueInvoice(Invoice $invoice): void diff --git a/app/Livewire/Flow2/RequiredFields.php b/app/Livewire/Flow2/RequiredFields.php index 6a606e00bb..48fe782e6d 100644 --- a/app/Livewire/Flow2/RequiredFields.php +++ b/app/Livewire/Flow2/RequiredFields.php @@ -15,7 +15,6 @@ namespace App\Livewire\Flow2; use Livewire\Component; use App\Libraries\MultiDB; use App\Models\CompanyGateway; -use Livewire\Attributes\Computed; use App\Services\Client\RFFService; use App\Utils\Traits\WithSecureContext; diff --git a/public/build/assets/app-03a29a9d.js b/public/build/assets/app-73d3ce3f.js similarity index 50% rename from public/build/assets/app-03a29a9d.js rename to public/build/assets/app-73d3ce3f.js index 54ab279e00..0394be05a3 100644 --- a/public/build/assets/app-03a29a9d.js +++ b/public/build/assets/app-73d3ce3f.js @@ -3,7 +3,7 @@ import{A as Kl}from"./index-08e160a7.js";import{c as Jt,g as Jl}from"./_commonjs ${s?'Expression: "'+s+`" -`:""}`,i),setTimeout(()=>{throw t},0)}var ir=!0;function tn(t){let i=ir;ir=!1;let s=t();return ir=i,s}function Bt(t,i,s={}){let c;return mt(t,i)(d=>c=d,s),c}function mt(...t){return Cn(...t)}var Cn=Tn;function Ei(t){Cn=t}var On;function Ai(t){On=t}function Tn(t,i){let s={};jt(s,t);let c=[s,...Y(t)],d=typeof i=="function"?Pn(c,i):Ci(c,i,t);return En.bind(null,t,i,d)}function Pn(t,i){return(s=()=>{},{scope:c={},params:d=[],context:p}={})=>{if(!ir){f(s,i,pe([c,...t]),d);return}let m=i.apply(pe([c,...t]),d);f(s,m)}}var Tr={};function Rn(t,i){if(Tr[t])return Tr[t];let s=Object.getPrototypeOf(async function(){}).constructor,c=/^[\n\s]*if.*\(.*\)/.test(t.trim())||/^(let|const)\s/.test(t.trim())?`(async()=>{ ${t} })()`:t,p=(()=>{try{let m=new s(["__self","scope"],`with (scope) { __self.result = ${c} }; __self.finished = true; return __self.result;`);return Object.defineProperty(m,"name",{value:`[Alpine] ${t}`}),m}catch(m){return nr(m,i,t),Promise.resolve()}})();return Tr[t]=p,p}function Ci(t,i,s){let c=Rn(i,s);return(d=()=>{},{scope:p={},params:m=[],context:x}={})=>{c.result=void 0,c.finished=!1;let L=pe([p,...t]);if(typeof c=="function"){let ae=c.call(x,c,L).catch(_e=>nr(_e,s,i));c.finished?(f(d,c.result,L,m,s),c.result=void 0):ae.then(_e=>{f(d,_e,L,m,s)}).catch(_e=>nr(_e,s,i)).finally(()=>c.result=void 0)}}}function f(t,i,s,c,d){if(ir&&typeof i=="function"){let p=i.apply(s,c);p instanceof Promise?p.then(m=>f(t,m,s,c)).catch(m=>nr(m,d,i)):t(p)}else typeof i=="object"&&i instanceof Promise?i.then(p=>t(p)):t(i)}function g(...t){return On(...t)}function w(t,i,s={}){var c,d;let p={};jt(p,t);let m=[p,...Y(t)],x=pe([(c=s.scope)!=null?c:{},...m]),L=(d=s.params)!=null?d:[];if(i.includes("await")){let ae=Object.getPrototypeOf(async function(){}).constructor,_e=/^[\n\s]*if.*\(.*\)/.test(i.trim())||/^(let|const)\s/.test(i.trim())?`(async()=>{ ${i} })()`:i;return new ae(["scope"],`with (scope) { let __result = ${_e}; return __result }`).call(s.context,x)}else{let ae=/^[\n\s]*if.*\(.*\)/.test(i.trim())||/^(let|const)\s/.test(i.trim())?`(()=>{ ${i} })()`:i,qe=new Function(["scope"],`with (scope) { let __result = ${ae}; return __result }`).call(s.context,x);return typeof qe=="function"&&ir?qe.apply(x,L):qe}}var A="x-";function N(t=""){return A+t}function q(t){A=t}var H={};function z(t,i){return H[t]=i,{before(s){if(!H[s]){console.warn(String.raw`Cannot find directive \`${s}\`. \`${t}\` will use the default order of execution`);return}const c=Ht.indexOf(s);Ht.splice(c>=0?c:Ht.indexOf("DEFAULT"),0,t)}}}function ue(t){return Object.keys(H).includes(t)}function ce(t,i,s){if(i=Array.from(i),t._x_virtualDirectives){let p=Object.entries(t._x_virtualDirectives).map(([x,L])=>({name:x,value:L})),m=Me(p);p=p.map(x=>m.find(L=>L.name===x.name)?{name:`x-bind:${x.name}`,value:`"${x.value}"`}:x),i=i.concat(p)}let c={};return i.map(lt((p,m)=>c[p]=m)).filter(Ut).map(hr(c,s)).sort(Mn).map(p=>et(t,p))}function Me(t){return Array.from(t).map(lt()).filter(i=>!Ut(i))}var Te=!1,je=new Map,Ee=Symbol();function Re(t){Te=!0;let i=Symbol();Ee=i,je.set(i,[]);let s=()=>{for(;je.get(i).length;)je.get(i).shift()();je.delete(i)},c=()=>{Te=!1,s()};t(s),c()}function Le(t){let i=[],s=x=>i.push(x),[c,d]=nt(t);return i.push(d),[{Alpine:Mr,effect:c,cleanup:s,evaluateLater:mt.bind(mt,t),evaluate:Bt.bind(Bt,t)},()=>i.forEach(x=>x())]}function et(t,i){let s=()=>{},c=H[i.type]||s,[d,p]=Le(t);We(t,i.original,p);let m=()=>{t._x_ignore||t._x_ignoreSelf||(c.inline&&c.inline(t,i,d),c=c.bind(c,t,i,d),Te?je.get(Ee).push(c):c())};return m.runCleanups=p,m}var De=(t,i)=>({name:s,value:c})=>(s.startsWith(t)&&(s=s.replace(t,i)),{name:s,value:c}),tt=t=>t;function lt(t=()=>{}){return({name:i,value:s})=>{let{name:c,value:d}=St.reduce((p,m)=>m(p),{name:i,value:s});return c!==i&&t(c,i),{name:c,value:d}}}var St=[];function ut(t){St.push(t)}function Ut({name:t}){return pr().test(t)}var pr=()=>new RegExp(`^${A}([^:^.]+)\\b`);function hr(t,i){return({name:s,value:c})=>{let d=s.match(pr()),p=s.match(/:([a-zA-Z0-9\-_:]+)/),m=s.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],x=i||t[s]||s;return{type:d?d[1]:null,value:p?p[1]:null,modifiers:m.map(L=>L.replace(".","")),expression:c,original:x}}}var Pr="DEFAULT",Ht=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Pr,"teleport"];function Mn(t,i){let s=Ht.indexOf(t.type)===-1?Pr:t.type,c=Ht.indexOf(i.type)===-1?Pr:i.type;return Ht.indexOf(s)-Ht.indexOf(c)}function Ct(t,i,s={}){t.dispatchEvent(new CustomEvent(i,{detail:s,bubbles:!0,composed:!0,cancelable:!0}))}function qt(t,i){if(typeof ShadowRoot=="function"&&t instanceof ShadowRoot){Array.from(t.children).forEach(d=>qt(d,i));return}let s=!1;if(i(t,()=>s=!0),s)return;let c=t.firstElementChild;for(;c;)qt(c,i),c=c.nextElementSibling}function ht(t,...i){console.warn(`Alpine Warning: ${t}`,...i)}var Yt=!1;function ar(){Yt&&ht("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Yt=!0,document.body||ht("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` +@endscript diff --git a/resources/views/portal/ninja2020/flow2/required-fields.blade.php b/resources/views/portal/ninja2020/flow2/required-fields.blade.php index cbe8b91e43..43b822b98b 100644 --- a/resources/views/portal/ninja2020/flow2/required-fields.blade.php +++ b/resources/views/portal/ninja2020/flow2/required-fields.blade.php @@ -1,5 +1,4 @@ -
+

{{ ctrans('texts.required_fields') }} @@ -19,7 +18,7 @@ @foreach($fields as $field) @component('portal.ninja2020.components.general.card-element', ['title' => $field['label']]) @if($field['name'] == 'client_country_id' || $field['name'] == 'client_shipping_country_id') -