(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-af880e30"],{4127:function(e,t,r){"use strict";var n=r("d233"),o=r("b313"),a={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Date.prototype.toISOString,c={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return i.call(e)},skipNulls:!1,strictNullHandling:!1},l=function e(t,r,o,a,i,l,s,u,p,d,f,m){var h=t;if("function"===typeof s)h=s(r,h);else if(h instanceof Date)h=d(h);else if(null===h){if(a)return l&&!m?l(r,c.encoder):r;h=""}if("string"===typeof h||"number"===typeof h||"boolean"===typeof h||n.isBuffer(h)){if(l){var y=m?r:l(r,c.encoder);return[f(y)+"="+f(l(h,c.encoder))]}return[f(r)+"="+f(String(h))]}var g,b=[];if("undefined"===typeof h)return b;if(Array.isArray(s))g=s;else{var v=Object.keys(h);g=u?v.sort(u):v}for(var O=0;O<g.length;++O){var j=g[O];i&&null===h[j]||(b=Array.isArray(h)?b.concat(e(h[j],o(r,j),o,a,i,l,s,u,p,d,f,m)):b.concat(e(h[j],r+(p?"."+j:"["+j+"]"),o,a,i,l,s,u,p,d,f,m)))}return b};e.exports=function(e,t){var r=e,i=t?n.assign({},t):{};if(null!==i.encoder&&void 0!==i.encoder&&"function"!==typeof i.encoder)throw new TypeError("Encoder has to be a function.");var s="undefined"===typeof i.delimiter?c.delimiter:i.delimiter,u="boolean"===typeof i.strictNullHandling?i.strictNullHandling:c.strictNullHandling,p="boolean"===typeof i.skipNulls?i.skipNulls:c.skipNulls,d="boolean"===typeof i.encode?i.encode:c.encode,f="function"===typeof i.encoder?i.encoder:c.encoder,m="function"===typeof i.sort?i.sort:null,h="undefined"!==typeof i.allowDots&&i.allowDots,y="function"===typeof i.serializeDate?i.serializeDate:c.serializeDate,g="boolean"===typeof i.encodeValuesOnly?i.encodeValuesOnly:c.encodeValuesOnly;if("undefined"===typeof i.format)i.format=o["default"];else if(!Object.prototype.hasOwnProperty.call(o.formatters,i.format))throw new TypeError("Unknown format option provided.");var b,v,O=o.formatters[i.format];"function"===typeof i.filter?(v=i.filter,r=v("",r)):Array.isArray(i.filter)&&(v=i.filter,b=v);var j,k=[];if("object"!==typeof r||null===r)return"";j=i.arrayFormat in a?i.arrayFormat:"indices"in i?i.indices?"indices":"repeat":"indices";var _=a[j];b||(b=Object.keys(r)),m&&b.sort(m);for(var w=0;w<b.length;++w){var x=b[w];p&&null===r[x]||(k=k.concat(l(r[x],x,_,u,p,d?f:null,v,m,h,y,O,g)))}var P=k.join(s),L=!0===i.addQueryPrefix?"?":"";return P.length>0?L+P:""}},4328:function(e,t,r){"use strict";var n=r("4127"),o=r("9e6a"),a=r("b313");e.exports={formats:a,parse:o,stringify:n}},"56d2":function(e,t,r){"use strict";var n=function(){var e=this,t=e._self._c;return t("div",[t("v-autocomplete",{attrs:{label:e.label,items:e.itemLookupOptions,loading:e.loadingLookupOptions,"search-input":e.searchLookupOptions,clearable:"","item-text":"name","item-value":"id",placeholder:" ","return-object":e.returnObject,"error-messages":e.error,"menu-props":{fixed:!0,nudgeBottom:10,maxHeight:300},dense:e.dense,box:e.box,solo:e.solo,flat:e.flat,outline:e.outline,"hide-details":e.hideDetails},on:{"update:searchInput":function(t){e.searchLookupOptions=t},"update:search-input":function(t){e.searchLookupOptions=t}},model:{value:e.internalValue,callback:function(t){e.internalValue=t},expression:"internalValue"}})],1)},o=[],a=(r("8e6e"),r("ac6a"),r("456d"),r("ade3")),i=r("365c"),c=r("2f62");function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){Object(a["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u={props:{value:[String,Object],itemOptions:{type:Array,default:function(){return[]}},label:String,error:Array,returnObject:{type:Boolean,default:!0},dense:{type:Boolean,default:!1},solo:{type:Boolean,default:!1},box:{type:Boolean,default:!1},flat:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1}},created:function(){this.internalValue=this.value},mounted:function(){0==this.itemOptions.length&&this.getLookupOptions()},computed:s(s({},Object(c["b"])(["adminScope"])),{},{itemLookupOptions:function(){return this.filteredLookupOptions=this.entryLookupOptions,this.filteredLookupOptions.map((function(e){var t=e.lease_id_name;return Object.assign({},e,{name:t})}))}}),watch:{searchLookupOptions:function(e){this.itemLookupOptions.length>0||this.loadingLookupOptions||(this.loadingLookupOptions=!0,this.getLookupOptions())},internalValue:function(){this.$emit("input",this.internalValue)}},methods:{getLookupOptions:function(){var e=this;i["a"].get("admin/lookup/lease-out-tenant",{params:{project_id:this.adminScope.projectId,company_id:this.adminScope.companyId}}).then((function(t){var r=t.data.data;e.entryLookupOptions=r})).catch((function(e){})).finally((function(){return e.loadingLookupOptions=!1}))}},data:function(){return{internalValue:{},entryLookupOptions:this.itemOptions,loadingLookupOptions:!1,searchLookupOptions:null}}},p=u,d=r("2877"),f=Object(d["a"])(p,n,o,!1,null,null,null);t["a"]=f.exports},"9e6a":function(e,t,r){"use strict";var n=r("d233"),o=Object.prototype.hasOwnProperty,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},i=function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,c=n.split(t.delimiter,i),l=0;l<c.length;++l){var s,u,p=c[l],d=p.indexOf("]="),f=-1===d?p.indexOf("="):d+1;-1===f?(s=t.decoder(p,a.decoder),u=t.strictNullHandling?null:""):(s=t.decoder(p.slice(0,f),a.decoder),u=t.decoder(p.slice(f+1),a.decoder)),o.call(r,s)?r[s]=[].concat(r[s]).concat(u):r[s]=u}return r},c=function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var a,i=e[o];if("[]"===i)a=[],a=a.concat(n);else{a=r.plainObjects?Object.create(null):{};var c="["===i.charAt(0)&&"]"===i.charAt(i.length-1)?i.slice(1,-1):i,l=parseInt(c,10);!isNaN(l)&&i!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[],a[l]=n):a[c]=n}n=a}return n},l=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,l=a.exec(n),s=l?n.slice(0,l.index):n,u=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;u.push(s)}var p=0;while(null!==(l=i.exec(n))&&p<r.depth){if(p+=1,!r.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+n.slice(l.index)+"]"),c(u,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!==typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"===typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:a.delimiter,r.depth="number"===typeof r.depth?r.depth:a.depth,r.arrayLimit="number"===typeof r.arrayLimit?r.arrayLimit:a.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"===typeof r.decoder?r.decoder:a.decoder,r.allowDots="boolean"===typeof r.allowDots?r.allowDots:a.allowDots,r.plainObjects="boolean"===typeof r.plainObjects?r.plainObjects:a.plainObjects,r.allowPrototypes="boolean"===typeof r.allowPrototypes?r.allowPrototypes:a.allowPrototypes,r.parameterLimit="number"===typeof r.parameterLimit?r.parameterLimit:a.parameterLimit,r.strictNullHandling="boolean"===typeof r.strictNullHandling?r.strictNullHandling:a.strictNullHandling,""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var o="string"===typeof e?i(e,r):e,c=r.plainObjects?Object.create(null):{},s=Object.keys(o),u=0;u<s.length;++u){var p=s[u],d=l(p,o[p],r);c=n.merge(c,d,r)}return n.compact(c)}},b313:function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},c771:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[t("v-container",{staticClass:"pt-0",attrs:{fluid:""}},[t("v-card",{attrs:{flat:""}},[t("v-toolbar",{staticClass:"primary lighten-2",attrs:{flat:"",dark:""}},[t("v-toolbar-title",{staticClass:"font-weight-light"},[e._v(" "+e._s(e.$t("message.accountReceivable"))+" "+e._s(e.$t("message.report")))])],1),t("v-layout",{attrs:{row:"",wrap:""}},[t("v-flex",{attrs:{xl3:"",lg3:"",md3:"",sm12:""}},[t("v-container",[t("v-layout",{attrs:{column:"",wrap:""}},[t("v-dialog",{ref:"dialog",attrs:{"return-value":e.record.to_date,persistent:"",lazy:"","full-width":"",width:"290px"},on:{"update:returnValue":function(t){return e.$set(e.record,"to_date",t)},"update:return-value":function(t){return e.$set(e.record,"to_date",t)}},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[t("v-text-field",{attrs:{slot:"activator",placeholder:" ",label:e.$t("message.untilPeriod"),"append-icon":"event",readonly:"",box:"",clearable:"","hide-details":""},slot:"activator",model:{value:e.record.to_date_picker,callback:function(t){e.$set(e.record,"to_date_picker",t)},expression:"record.to_date_picker"}}),t("v-date-picker",{on:{change:function(t){return e.$refs.dialog.save(e.record.to_date)}},model:{value:e.record.to_date_picker,callback:function(t){e.$set(e.record,"to_date_picker",t)},expression:"record.to_date_picker"}})],1)],1)],1)],1),t("v-flex",{attrs:{xl3:"",lg3:"",md3:"",sm12:""}},[t("v-container",[t("v-layout",{attrs:{column:"",wrap:""}},[t("from-tenant-lookup",e._b({attrs:{"hide-details":""},model:{value:e.record.from_unit,callback:function(t){e.$set(e.record,"from_unit",t)},expression:"record.from_unit"}},"from-tenant-lookup",{label:e.$t("message.fromTenant"),itemOptions:e.fromUnitOptions,dense:!0,box:!0,returnObject:!0,error:e.getValue(e.errorMessages,"")},!1))],1)],1)],1),t("v-flex",{attrs:{xl3:"",lg3:"",md3:"",sm12:""}},[t("v-container",[t("v-layout",{attrs:{column:"",wrap:""}},[t("to-tenant-lookup",e._b({attrs:{"hide-details":""},model:{value:e.record.to_unit,callback:function(t){e.$set(e.record,"to_unit",t)},expression:"record.to_unit"}},"to-tenant-lookup",{label:e.$t("message.toTenant"),itemOptions:e.toUnitOptions,dense:!0,box:!0,returnObject:!0,error:e.getValue(e.errorMessages,"")},!1))],1)],1)],1)],1),t("v-layout",{attrs:{row:"",wrap:""}},[t("v-flex",{attrs:{xl6:"",lg6:"",md6:"",sm12:""}},[t("v-container",[t("v-layout",{attrs:{column:"",wrap:""}},[t("v-select",{attrs:{items:e.itemChargeItemOptions,loading:e.loadingChargeItemOptions,label:e.$t("message.chargeItem"),placeholder:" ",attach:"",clearable:"",box:"",chips:"",multiple:"","item-value":"id","item-text":"name"},model:{value:e.record.charge_items,callback:function(t){e.$set(e.record,"charge_items",t)},expression:"record.charge_items"}})],1)],1)],1)],1),t("v-toolbar",{attrs:{dense:"",flat:"",color:"grey lighten-2"}},[t("v-spacer"),[t("v-form",{attrs:{action:e.pdfLink,target:"_blank",method:"POST"}},[t("input",{attrs:{type:"hidden",name:"project_id"},domProps:{value:e.adminScope.projectId}}),t("input",{attrs:{type:"hidden",name:"company_id"},domProps:{value:e.adminScope.companyId}}),t("input",{attrs:{type:"hidden",name:"to_date"},domProps:{value:e.record.to_date_picker}}),t("input",{attrs:{type:"hidden",name:"from_unit"},domProps:{value:e.getValue(e.record.from_unit,"company_name")}}),t("input",{attrs:{type:"hidden",name:"to_unit"},domProps:{value:e.getValue(e.record.to_unit,"company_name")}}),t("input",{attrs:{type:"hidden",name:"charge_items[]"},domProps:{value:e.record.charge_items}}),t("input",{attrs:{type:"hidden",name:"consolidate"},domProps:{value:e.consolidate}}),t("v-btn",{attrs:{color:"info",depressed:"",loading:e.generate},on:{click:e.downloadXls}},[e._v("\n                "+e._s(e.$t("message.xls"))+"\n                "),t("v-icon",{attrs:{right:"",dark:""}},[e._v("cloud_download")])],1)],1)]],2)],1)],1),t("snackbar",{attrs:{snackbar:e.snackbar}}),t("v-snackbar",{attrs:{color:"error"},model:{value:e.alert,callback:function(t){e.alert=t},expression:"alert"}},[e._v("\n      Please select Report Type\n      "),t("v-btn",{attrs:{dark:"",flat:""},on:{click:function(t){e.alert=!1}}},[e._v("\n        Close\n      ")])],1)],1)},o=[],a=(r("8e6e"),r("ac6a"),r("456d"),r("6b54"),r("7f7f"),r("ade3")),i=r("365c"),c=r("2f62"),l=r("4da1"),s=r("323e"),u=r.n(s),p=(r("7fb5"),r("1dce")),d=(r("c1df"),r("45a3")),f=r("5e44"),m=r("8106"),h=r("56d2");function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){Object(a["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=r("4328"),v=r("c198"),O={mixins:[p["validationMixin"]],validations:{},constants:{},props:{},created:function(){var e=this;this.checkPermission(),window.Echo.channel("report."+this.uuid).listen("GenerateReportCompleted",(function(t){i["a"].get("admin/file",{params:{name:t.file,keep:!1},responseType:"blob"}).then((function(e){var t=window.URL.createObjectURL(new Blob([e.data])),r=document.createElement("a");r.href=t,r.setAttribute("download","account-receivable-report.xlsx"),document.body.appendChild(r),r.click(),r.parentNode.removeChild(r)})).catch((function(e){})).then((function(){e.generate=!1}))})),this.getChargeItemOptions()},components:{Breadcrumbs:f["a"],Snackbar:m["a"],ConfirmDialog:d["a"],FromTenantLookup:h["a"],ToTenantLookup:h["a"]},computed:g(g({},Object(c["b"])(["adminScope"])),{},{breadcrumbs:function(){var e=[{text:this.$t("message.accountReceivable"),disabled:!0}];return e.push({text:this.$t("message.report"),disabled:!0}),e},locked:function(){return this.record.locked},itemChargeItemOptions:function(){return this.entryChargeItemOptions.map((function(e){var t=e.code+"-"+e.name;return Object.assign({},e,{name:t})}))},pdfLink:function(){return"https://pms.putericoveresidences.net/service/api/admin/rems/ar-report/report-acc-receive/export-pdf"},uuid:function(){return this.$uuid.v1().substring(0,13)}}),watch:{searchChargeItemOptions:function(e){this.itemChargeItemOptions.length>0||this.loadingChargeItemOptions||(this.loadingChargeItemOptions=!0,this.getChargeItemOptions())}},methods:{getValue:function(e,t){return Object(l["j"])(e,t)},getDateTimeFromISO:function(e,t){return Object(l["g"])(e,t)},getDateFromISO:function(e,t){return Object(l["e"])(e,t)},convertDateToISO:function(e,t){return Object(l["a"])(e,t)},allowedTo:function(e){switch(e){case"manage":return!this.$can.not("manage","acl.admin.rems.receivable-reports.account-receivable")}return!1},downloadXls:function(){this.generate=!0,i["a"].get("admin/rems/ar-report/report-acc-receive/export-xls",{params:{uuid:this.uuid,to_date:this.record.to_date_picker,from_unit:Object(l["j"])(this.record.from_unit,"company_name"),to_unit:Object(l["j"])(this.record.to_unit,"company_name"),"charge_items[]":this.record.charge_items,consolidate:this.consolidate,project_id:this.adminScope.projectId,company_id:this.adminScope.companyId},paramsSerializer:function(e){return b.stringify(e,{indices:!1})}}).then((function(e){})).catch((function(e){})).then((function(){}))},checkPermission:function(){var e=this;this.form.fetching=!0;var t=v.encrypt("admin_rems/report_account_receivable","reportKey"),r=t.ciphertext.toString(),n=t.key.toString(),o=t.iv.toString();u.a.start(),i["a"].get("admin/check-permission",{params:{project_id:this.adminScope.projectId,company_id:this.adminScope.companyId,permission:r,key2:o,key:n}}).then((function(e){})).catch((function(e){})).then((function(){u.a.done(),e.form.fetching=!1}))},getChargeItemOptions:function(){var e=this;i["a"].get("admin/lookup/charge-item",{params:{project_id:this.adminScope.projectId,company_id:this.adminScope.companyId}}).then((function(t){var r=t.data.data;e.entryChargeItemOptions=r})).catch((function(e){})).finally((function(){return e.loadingChargeItemOptions=!1}))}},data:function(){return{fetching:!1,record:{},report_type:{id:"1"},charge_items:[],view_by:{},index:null,consolidate:!1,defaultRecord:{},date:null,from_date:null,to_date:null,menu:!1,modal:!1,fromUnitOptions:[],toUnitOptions:[],entryChargeItemOptions:[],loadingChargeItemOptions:!1,searchChargeItemOptions:null,mode:"view",searching:!1,generate:!1,showConfirmDeleteRecord:!1,form:{fetching:!1,loading:!1,action:null},snackbar:{show:!1,type:null,message:null},alert:!1,errorMessages:null}}},j=O,k=r("2877"),_=Object(k["a"])(j,n,o,!1,null,null,null);t["default"]=_.exports},d233:function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e){var t;while(e.length){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)"undefined"!==typeof t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t},i=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!==typeof e[n]&&(r[n]=e[n]);return r},c=function e(t,r,o){if(!r)return t;if("object"!==typeof r){if(Array.isArray(t))t.push(r);else{if("object"!==typeof t)return[t,r];(o.plainObjects||o.allowPrototypes||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!==typeof t)return[t].concat(r);var a=t;return Array.isArray(t)&&!Array.isArray(r)&&(a=i(t,o)),Array.isArray(t)&&Array.isArray(r)?(r.forEach((function(r,a){n.call(t,a)?t[a]&&"object"===typeof t[a]?t[a]=e(t[a],r,o):t.push(r):t[a]=r})),t):Object.keys(r).reduce((function(t,a){var i=r[a];return n.call(t,a)?t[a]=e(t[a],i,o):t[a]=i,t}),a)},l=function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},s=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},u=function(e){if(0===e.length)return e;for(var t="string"===typeof e?e:String(e),r="",n=0;n<t.length;++n){var a=t.charCodeAt(n);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+=t.charAt(n):a<128?r+=o[a]:a<2048?r+=o[192|a>>6]+o[128|63&a]:a<55296||a>=57344?r+=o[224|a>>12]+o[128|a>>6&63]+o[128|63&a]:(n+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(n)),r+=o[240|a>>18]+o[128|a>>12&63]+o[128|a>>6&63]+o[128|63&a])}return r},p=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],c=Object.keys(i),l=0;l<c.length;++l){var s=c[l],u=i[s];"object"===typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:i,prop:s}),r.push(u))}return a(t)},d=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},f=function(e){return null!==e&&"undefined"!==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))};e.exports={arrayToObject:i,assign:l,compact:p,decode:s,encode:u,isBuffer:f,isRegExp:d,merge:c}}}]);