diff --git a/app/Http/Controllers/ClientPortal/InvoiceController.php b/app/Http/Controllers/ClientPortal/InvoiceController.php index b7ced5d349..9b7e3ef169 100644 --- a/app/Http/Controllers/ClientPortal/InvoiceController.php +++ b/app/Http/Controllers/ClientPortal/InvoiceController.php @@ -90,7 +90,7 @@ class InvoiceController extends Controller //filter invoices which are payable $invoices = $invoices->filter(function ($invoice) { - return $invoice->isPayable() && $invoice->balance > 0; + return $invoice->isPayable(); }); //return early if no invoices. diff --git a/app/Http/Controllers/ClientPortal/PaymentController.php b/app/Http/Controllers/ClientPortal/PaymentController.php index 44ab311c84..adba7e252f 100644 --- a/app/Http/Controllers/ClientPortal/PaymentController.php +++ b/app/Http/Controllers/ClientPortal/PaymentController.php @@ -106,7 +106,7 @@ class PaymentController extends Controller if ($payable_invoices->count() == 0) { return redirect() ->route('client.invoices.index') - ->with(['warning' => 'No payable invoices selected.']); + ->with(['message' => 'No payable invoices selected.']); } $settings = auth()->user()->client->getMergedSettings(); diff --git a/public/js/app.js b/public/js/app.js index 8903e70bbb..90cc4e672d 100755 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({"+YGh":function(e,t,n){"use strict";function r(e,t){return{isValid:e,isPotentiallyValid:t}}e.exports=function(e,t){return t=(t=t||3)instanceof Array?t:[t],"string"!=typeof e?r(!1,!1):/^\d*$/.test(e)?function(e,t){for(var n=0;nfunction(e){for(var t=3,n=0;nt?e[n]:t;return t}(t)?r(!1,!1):r(!0,!0):r(!1,!1)}},0:function(e,t,n){n("bUC5"),e.exports=n("pyCd")},"0H2f":function(e,t,n){"use strict";e.exports={number:n("eROS"),expirationDate:n("u4Xs"),expirationMonth:n("2EnR"),expirationYear:n("uRxV"),cvv:n("+YGh"),postalCode:n("swuF"),creditCardType:n("3T3Z")}},"2EnR":function(e,t,n){"use strict";function r(e,t,n){return{isValid:e,isPotentiallyValid:t,isValidForThisYear:n||!1}}e.exports=function(e){var t,n,o=(new Date).getMonth()+1;return"string"!=typeof e?r(!1,!1):""===e.replace(/\s/g,"")||"0"===e?r(!1,!0):/^\d*$/.test(e)?(t=parseInt(e,10),isNaN(e)?r(!1,!1):r(n=t>0&&t<13,n,n&&t>=o)):r(!1,!1)}},"2SVd":function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},"3T3Z":function(e,t,n){"use strict";var r,o=n("X3S+"),i=n("RGrI"),s=n("MYJU"),a=n("nyOA"),u=n("uVg8"),c={},f={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},p=[f.VISA,f.MASTERCARD,f.AMERICAN_EXPRESS,f.DINERS_CLUB,f.DISCOVER,f.JCB,f.UNIONPAY,f.MAESTRO,f.ELO,f.MIR,f.HIPER,f.HIPERCARD];function l(e){return c[e]||o[e]}function d(e,t){var n=r.indexOf(e);if(!t&&-1===n)throw new Error('"'+e+'" is not a supported card type.');return n}function h(e){var t,n=[];return a(e)?0===e.length?r.map((function(e){return i(l(e))})):(r.forEach((function(t){var r=l(t);u(e,r,n)})),(t=s(n))?[t]:n):[]}r=i(p),h.getTypeInfo=function(e){return i(l(e))},h.removeCard=function(e){var t=d(e);r.splice(t,1)},h.addCard=function(e){var t=d(e.type,!0);c[e.type]=e,-1===t&&r.push(e.type)},h.updateCard=function(e,t){var n,r=c[e]||o[e];if(!r)throw new Error('"'+e+'" is not a recognized type. Use `addCard` instead.');if(t.type&&r.type!==t.type)throw new Error("Cannot overwrite type parameter.");n=i(r,!0),Object.keys(n).forEach((function(e){t[e]&&(n[e]=t[e])})),c[n.type]=n},h.changeOrder=function(e,t){var n=d(e);r.splice(n,1),r.splice(t,0,e)},h.resetModifications=function(){r=i(p),c={}},h.types=f,e.exports=h},"5oMp":function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},"8oxB":function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],f=!1,p=-1;function l(){f&&u&&(f=!1,u.length?c=u.concat(c):p=-1,c.length&&d())}function d(){if(!f){var e=a(l);f=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u}).call(this,n("8oxB"))},LYNF:function(e,t,n){"use strict";var r=n("OH9c");e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},Lmem:function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},MLWZ:function(e,t,n){"use strict";var r=n("xTJ+");function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},MYJU:function(e,t,n){"use strict";e.exports=function(e){if(function(e){var t=e.filter((function(e){return e.matchStrength})).length;return t>0&&t===e.length}(e))return e.reduce((function(e,t){return e?e.matchStrength1||1===a&&Number(i[1])>2?1:1===a?(s=i.substr(1),r(s).isPotentiallyValid?1:2):5===i.length?1:i.length>5?2:1,{month:t=e.substr(0,n),year:e.substr(t.length)})}},OTTw:function(e,t,n){"use strict";var r=n("xTJ+");e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},RABH:function(e,t,n){"use strict";e.exports=function(e,t){return Array.isArray(t)?function(e,t,n){var r=String(t).length,o=e.substr(0,r),i=parseInt(o,10);return t=parseInt(String(t).substr(0,o.length),10),n=parseInt(String(n).substr(0,o.length),10),i>=t&&i<=n}(e,t[0],t[1]):function(e,t){return(t=String(t)).substring(0,e.length)===e.substring(0,t.length)}(e,t)}},RGrI:function(e,t,n){"use strict";e.exports=function(e){return e?JSON.parse(JSON.stringify(e)):null}},"Rn+g":function(e,t,n){"use strict";var r=n("LYNF");e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},SntB:function(e,t,n){"use strict";var r=n("xTJ+");e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,(function(e){void 0!==t[e]&&(n[e]=t[e])})),r.forEach(i,(function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):void 0!==t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):void 0!==e[o]&&(n[o]=e[o])})),r.forEach(s,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}));var a=o.concat(i).concat(s),u=Object.keys(t).filter((function(e){return-1===a.indexOf(e)}));return r.forEach(u,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])})),n}},UnBK:function(e,t,n){"use strict";var r=n("xTJ+"),o=n("xAGQ"),i=n("Lmem"),s=n("JEQr");function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"X3S+":function(e,t,n){"use strict";e.exports={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}}},bUC5:function(e,t,n){window.axios=n("vDqi"),window.valid=n("0H2f"),window.processingOverlay=function(e){return e?document.getElementById("processing-overlay").classList.remove("hidden"):document.getElementById("processing-overlay").classList.add("hidden")},document.querySelectorAll(".disposable-alert").forEach((function(e){setTimeout((function(){e.remove()}),3e3)}))},eROS:function(e,t,n){"use strict";var r=n("foYR"),o=n("3T3Z");function i(e,t,n){return{card:e,isPotentiallyValid:t,isValid:n}}e.exports=function(e,t){var n,s,a,u,c;if(t=t||{},"number"==typeof e&&(e=String(e)),"string"!=typeof e)return i(null,!1,!1);if(e=e.replace(/\-|\s/g,""),!/^\d*$/.test(e))return i(null,!1,!1);if(0===(n=o(e)).length)return i(null,!1,!1);if(1!==n.length)return i(null,!0,!1);if(s=n[0],t.maxLength&&e.length>t.maxLength)return i(s,!1,!1);for(a=s.type===o.types.UNIONPAY&&!0!==t.luhnValidateUnionPay||r(e),c=Math.max.apply(null,s.lengths),t.maxLength&&(c=Math.min(t.maxLength,c)),u=0;u=0;)t=parseInt(e.charAt(o),10),r&&(t*=2)>9&&(t=t%10+1),r=!r,n+=t,o--;return n%10==0}},g7np:function(e,t,n){"use strict";var r=n("2SVd"),o=n("5oMp");e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},"jfS+":function(e,t,n){"use strict";var r=n("endd");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},nyOA:function(e,t,n){"use strict";e.exports=function(e){return"string"==typeof e||e instanceof String}},pyCd:function(e,t){},swuF:function(e,t,n){"use strict";function r(e,t){return{isValid:e,isPotentiallyValid:t}}e.exports=function(e,t){var n;return n=(t=t||{}).minLength||3,"string"!=typeof e?r(!1,!1):e.length4?r(!1,!1):(e=parseInt(e,10),i=Number(String(n).substr(2,2)),2===o?(a=i===e,s=e>=i&&e<=i+t):4===o&&(a=n===e,s=e>=n&&e<=n+t),r(s,s,a))):r(!1,!1)}},uVg8:function(e,t,n){"use strict";var r=n("RGrI"),o=n("RABH");e.exports=function(e,t,n){var i,s,a,u;for(i=0;i=a&&(u.matchStrength=a),n.push(u);break}}},vDqi:function(e,t,n){e.exports=n("zuR4")},w0Vi:function(e,t,n){"use strict";var r=n("xTJ+"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},xAGQ:function(e,t,n){"use strict";var r=n("xTJ+");e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},"xTJ+":function(e,t,n){"use strict";var r=n("HSsa"),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;nfunction(e){for(var t=3,n=0;nt?e[n]:t;return t}(t)?r(!1,!1):r(!0,!0):r(!1,!1)}},0:function(e,t,n){n("bUC5"),e.exports=n("pyCd")},"0H2f":function(e,t,n){"use strict";e.exports={number:n("eROS"),expirationDate:n("u4Xs"),expirationMonth:n("2EnR"),expirationYear:n("uRxV"),cvv:n("+YGh"),postalCode:n("swuF"),creditCardType:n("3T3Z")}},"2EnR":function(e,t,n){"use strict";function r(e,t,n){return{isValid:e,isPotentiallyValid:t,isValidForThisYear:n||!1}}e.exports=function(e){var t,n,o=(new Date).getMonth()+1;return"string"!=typeof e?r(!1,!1):""===e.replace(/\s/g,"")||"0"===e?r(!1,!0):/^\d*$/.test(e)?(t=parseInt(e,10),isNaN(e)?r(!1,!1):r(n=t>0&&t<13,n,n&&t>=o)):r(!1,!1)}},"2SVd":function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},"3T3Z":function(e,t,n){"use strict";var r,o=n("X3S+"),i=n("RGrI"),s=n("MYJU"),a=n("nyOA"),u=n("uVg8"),c={},f={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},p=[f.VISA,f.MASTERCARD,f.AMERICAN_EXPRESS,f.DINERS_CLUB,f.DISCOVER,f.JCB,f.UNIONPAY,f.MAESTRO,f.ELO,f.MIR,f.HIPER,f.HIPERCARD];function l(e){return c[e]||o[e]}function d(e,t){var n=r.indexOf(e);if(!t&&-1===n)throw new Error('"'+e+'" is not a supported card type.');return n}function h(e){var t,n=[];return a(e)?0===e.length?r.map((function(e){return i(l(e))})):(r.forEach((function(t){var r=l(t);u(e,r,n)})),(t=s(n))?[t]:n):[]}r=i(p),h.getTypeInfo=function(e){return i(l(e))},h.removeCard=function(e){var t=d(e);r.splice(t,1)},h.addCard=function(e){var t=d(e.type,!0);c[e.type]=e,-1===t&&r.push(e.type)},h.updateCard=function(e,t){var n,r=c[e]||o[e];if(!r)throw new Error('"'+e+'" is not a recognized type. Use `addCard` instead.');if(t.type&&r.type!==t.type)throw new Error("Cannot overwrite type parameter.");n=i(r,!0),Object.keys(n).forEach((function(e){t[e]&&(n[e]=t[e])})),c[n.type]=n},h.changeOrder=function(e,t){var n=d(e);r.splice(n,1),r.splice(t,0,e)},h.resetModifications=function(){r=i(p),c={}},h.types=f,e.exports=h},"5oMp":function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},"8oxB":function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],f=!1,p=-1;function l(){f&&u&&(f=!1,u.length?c=u.concat(c):p=-1,c.length&&d())}function d(){if(!f){var e=a(l);f=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u}).call(this,n("8oxB"))},LYNF:function(e,t,n){"use strict";var r=n("OH9c");e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},Lmem:function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},MLWZ:function(e,t,n){"use strict";var r=n("xTJ+");function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},MYJU:function(e,t,n){"use strict";e.exports=function(e){if(function(e){var t=e.filter((function(e){return e.matchStrength})).length;return t>0&&t===e.length}(e))return e.reduce((function(e,t){return e?e.matchStrength1||1===a&&Number(i[1])>2?1:1===a?(s=i.substr(1),r(s).isPotentiallyValid?1:2):5===i.length?1:i.length>5?2:1,{month:t=e.substr(0,n),year:e.substr(t.length)})}},OTTw:function(e,t,n){"use strict";var r=n("xTJ+");e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},RABH:function(e,t,n){"use strict";e.exports=function(e,t){return Array.isArray(t)?function(e,t,n){var r=String(t).length,o=e.substr(0,r),i=parseInt(o,10);return t=parseInt(String(t).substr(0,o.length),10),n=parseInt(String(n).substr(0,o.length),10),i>=t&&i<=n}(e,t[0],t[1]):function(e,t){return(t=String(t)).substring(0,e.length)===e.substring(0,t.length)}(e,t)}},RGrI:function(e,t,n){"use strict";e.exports=function(e){return e?JSON.parse(JSON.stringify(e)):null}},"Rn+g":function(e,t,n){"use strict";var r=n("LYNF");e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},SntB:function(e,t,n){"use strict";var r=n("xTJ+");e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,(function(e){void 0!==t[e]&&(n[e]=t[e])})),r.forEach(i,(function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):void 0!==t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):void 0!==e[o]&&(n[o]=e[o])})),r.forEach(s,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}));var a=o.concat(i).concat(s),u=Object.keys(t).filter((function(e){return-1===a.indexOf(e)}));return r.forEach(u,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])})),n}},UnBK:function(e,t,n){"use strict";var r=n("xTJ+"),o=n("xAGQ"),i=n("Lmem"),s=n("JEQr");function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"X3S+":function(e,t,n){"use strict";e.exports={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}}},bUC5:function(e,t,n){window.axios=n("vDqi"),window.valid=n("0H2f"),document.querySelectorAll(".disposable-alert").forEach((function(e){setTimeout((function(){e.remove()}),5e3)}))},eROS:function(e,t,n){"use strict";var r=n("foYR"),o=n("3T3Z");function i(e,t,n){return{card:e,isPotentiallyValid:t,isValid:n}}e.exports=function(e,t){var n,s,a,u,c;if(t=t||{},"number"==typeof e&&(e=String(e)),"string"!=typeof e)return i(null,!1,!1);if(e=e.replace(/\-|\s/g,""),!/^\d*$/.test(e))return i(null,!1,!1);if(0===(n=o(e)).length)return i(null,!1,!1);if(1!==n.length)return i(null,!0,!1);if(s=n[0],t.maxLength&&e.length>t.maxLength)return i(s,!1,!1);for(a=s.type===o.types.UNIONPAY&&!0!==t.luhnValidateUnionPay||r(e),c=Math.max.apply(null,s.lengths),t.maxLength&&(c=Math.min(t.maxLength,c)),u=0;u=0;)t=parseInt(e.charAt(o),10),r&&(t*=2)>9&&(t=t%10+1),r=!r,n+=t,o--;return n%10==0}},g7np:function(e,t,n){"use strict";var r=n("2SVd"),o=n("5oMp");e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},"jfS+":function(e,t,n){"use strict";var r=n("endd");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},nyOA:function(e,t,n){"use strict";e.exports=function(e){return"string"==typeof e||e instanceof String}},pyCd:function(e,t){},swuF:function(e,t,n){"use strict";function r(e,t){return{isValid:e,isPotentiallyValid:t}}e.exports=function(e,t){var n;return n=(t=t||{}).minLength||3,"string"!=typeof e?r(!1,!1):e.length4?r(!1,!1):(e=parseInt(e,10),i=Number(String(n).substr(2,2)),2===o?(a=i===e,s=e>=i&&e<=i+t):4===o&&(a=n===e,s=e>=n&&e<=n+t),r(s,s,a))):r(!1,!1)}},uVg8:function(e,t,n){"use strict";var r=n("RGrI"),o=n("RABH");e.exports=function(e,t,n){var i,s,a,u;for(i=0;i=a&&(u.matchStrength=a),n.push(u);break}}},vDqi:function(e,t,n){e.exports=n("zuR4")},w0Vi:function(e,t,n){"use strict";var r=n("xTJ+"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},xAGQ:function(e,t,n){"use strict";var r=n("xTJ+");e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},"xTJ+":function(e,t,n){"use strict";var r=n("HSsa"),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n { - if (show) { - return document - .getElementById('processing-overlay') - .classList.remove('hidden'); - } - - return document - .getElementById('processing-overlay') - .classList.add('hidden'); -}; /** * Remove flashing message div after 3 seconds. @@ -35,5 +21,5 @@ window.processingOverlay = (show) => { document.querySelectorAll('.disposable-alert').forEach((element) => { setTimeout(() => { element.remove(); - }, 3000); + }, 5000); }); diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 2dbaf436b3..e0baaf184b 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -3383,5 +3383,6 @@ return [ 'create_webhook_failure' => 'Failed to create Webhook', 'number' => 'Number', 'payment_message_extended' => 'Thank you for your payment of :amount for :invoice', + 'online_payments_minimum_note' => 'Note: Online payments are supported only if amount is bigger than $1 or currency equivalent.', 'payment_token_not_found' => 'Payment token not found, please try again. If an issue still persist, try with another payment method', ]; diff --git a/resources/views/portal/ninja2020/invoices/payment.blade.php b/resources/views/portal/ninja2020/invoices/payment.blade.php index 344f2e8f0d..55cc78958f 100644 --- a/resources/views/portal/ninja2020/invoices/payment.blade.php +++ b/resources/views/portal/ninja2020/invoices/payment.blade.php @@ -40,7 +40,7 @@ {{ \App\Models\CompanyGateway::find($payment_method['company_gateway_id'])->firstOrFail()->getConfigField('name') }} - @else + @elseif($total > 0) {{ $payment_method['label'] }} @@ -151,6 +151,10 @@ @endforeach + + @if(intval($total) == 0) + * {{ ctrans('texts.online_payments_minimum_note') }} + @endif diff --git a/resources/views/portal/ninja2020/layout/clean.blade.php b/resources/views/portal/ninja2020/layout/clean.blade.php index 86f21c40fa..ae091322db 100644 --- a/resources/views/portal/ninja2020/layout/clean.blade.php +++ b/resources/views/portal/ninja2020/layout/clean.blade.php @@ -69,6 +69,12 @@ @include('portal.ninja2020.components.primary-color') + @if(session()->has('message')) +
+ {{ session('message') }} +
+ @endif + @yield('body')