⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
qda-digital.online
/
public
/
dist
/
js
/
Edit File: 145.ca4641.js
/*! For license information please see 145.ca4641.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[145],{530:function(t,e,n){"use strict";n.r(e);var r=n(5),o=n(3),a=n.n(o),i=n(4),s=n(16),c=n.n(s);function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(){u=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function v(t,e,n,o){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),s=new O(o||[]);return r(i,"_invoke",{value:C(t,n,s)}),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=v;var _={};function d(){}function m(){}function h(){}var p={};c(p,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(j([])));g&&g!==e&&n.call(g,a)&&(p=g);var b=h.prototype=d.prototype=Object.create(p);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;r(this,"_invoke",{value:function(r,a){function i(){return new e((function(o,i){!function r(o,a,i,s){var c=f(t[o],t,a);if("throw"!==c.type){var u=c.arg,v=u.value;return v&&"object"==l(v)&&n.call(v,"__await")?e.resolve(v.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(v).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,s)}))}s(c.arg)}(r,a,o,i)}))}return o=o?o.then(i,i):i()}})}function C(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return E()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=D(i,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===_)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function D(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,D(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,_;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,_):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function $(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return m.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:m,configurable:!0}),m.displayName=c(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new x(v(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach($),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,_):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),$(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;$(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),_}},t}function v(t,e,n,r,o,a,i){try{var s=t[a](i),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){v(a,r,o,i,s,"next",t)}function s(t){v(a,r,o,i,s,"throw",t)}i(void 0)}))}}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===l(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m={middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("sales.quotations.view.page_title")}},data:function(){return{allData:"",breadcrumbsCurrent:"sales.quotations.view.breadcrumbs_current",breadcrumbs:[{name:"sales.quotations.view.breadcrumbs_first",url:"home"},{name:"sales.quotations.view.breadcrumbs_second",url:"quotations.index"},{name:"sales.quotations.view.breadcrumbs_active",url:""}],quotationProducts:[],quotationPrefix:"",clientPrefix:"",productPrefix:"",loading:!1,form:new r.a({isSendEmail:!1,isSendSMS:!1}),isDemoMode:window.config.isDemoMode}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(i.b)("operations",["appInfo"])),created:function(){this.getQuotation(),this.quotationPrefix=this.appInfo.quotationPrefix,this.clientPrefix=this.appInfo.clientPrefix,this.productPrefix=this.appInfo.productPrefix},methods:{getQuotation:function(){var t=this;return f(u().mark((function e(){var n,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,a.a.get(window.location.origin+"/api/quotations/"+t.$route.params.slug);case 3:n=e.sent,r=n.data,t.allData=r.data,t.quotationProducts=t.allData.products,t.quotationProducts.sort(t.sortProducts),t.loading=!1;case 9:case"end":return e.stop()}}),e)})))()},sortProducts:function(t,e){return t.productCode<e.productCode?-1:t.productCode>e.productCode?1:0},generatePDF:function(){var t=document.getElementById("content-to-pdf"),e={margin:5,filename:"Quotation-"+this.$route.params.slug+".pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2},jsPDF:{unit:"mm",format:"a4",orientation:"portrait"}};c()().from(t).set(e).save(),toast.fire({type:"success",title:this.$t("Download started.")})},notify:function(){var t=this;return f(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.isDemoMode){e.next=7;break}return t.loading=!0,e.next=4,t.form.post(window.location.origin+"/api/quotation/notify/"+t.$route.params.slug).then((function(){toast.fire({type:"success",title:t.$t("Notification sent successfully.")})})).catch((function(){toast.fire({type:"error",title:t.$t("common.error_msg")})}));case 4:t.loading=!1,e.next=8;break;case 7:toast.fire({type:"warning",title:t.$t("You are not allowed to do this in demo version.")});case 8:case"end":return e.stop()}}),e)})))()},printWindow:function(){window.print()}}},h=n(1),p=Object(h.a)(m,(function(){var t=this,e=t._self._c;return e("div",[e("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),e("div",{staticClass:"row no-print mb-2"},[e("div",{staticClass:"w-100 text-right float-right"},[t.allData?e("div",{staticClass:"btn-group"},[e("a",{staticClass:"btn btn-secondary",attrs:{href:"#"},on:{click:function(e){t.notify(t.form.isSendSMS=!0)}}},[e("i",{staticClass:"fas fa-sms"}),t._v(" "+t._s(t.$t("common.sms"))+"\n ")]),t._v(" "),e("a",{staticClass:"btn btn-success",attrs:{href:"#"},on:{click:function(e){t.notify(t.form.isSendEmail=!0)}}},[e("i",{staticClass:"fas fa-paper-plane"}),t._v(" "+t._s(t.$t("email")))]),t._v(" "),e("a",{staticClass:"btn btn-primary",attrs:{href:"#"},on:{click:function(e){return t.generatePDF()}}},[e("i",{staticClass:"fas fa-download"}),t._v(" "+t._s(t.$t("download"))+"\n ")]),t._v(" "),e("a",{staticClass:"btn btn-secondary",attrs:{href:"#"},on:{click:function(e){return t.printWindow()}}},[e("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.$t("common.print"))+"\n ")]),t._v(" "),t.$can("quotation-edit")?e("router-link",{staticClass:"btn btn-info",attrs:{to:{name:"quotations.edit",params:{slug:t.allData.slug}}}},[e("i",{staticClass:"fas fa-edit"}),t._v(" "+t._s(t.$t("common.edit"))+"\n ")]):t._e(),t._v(" "),e("router-link",{staticClass:"btn btn-dark float-right",attrs:{to:{name:"quotations.index"}}},[e("i",{staticClass:"fas fa-long-arrow-alt-left"}),t._v(" "+t._s(t.$t("common.back"))+"\n ")])],1):t._e()])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"invoice p-3 mb-3 w-100",attrs:{id:"content-to-pdf"}},[e("table-loading",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}]}),t._v(" "),e("div",{staticClass:"row invoice-info"},[e("div",{staticClass:"col-sm-4 invoice-col"},[e("CompanyInfo")],1),t._v(" "),e("div",{staticClass:"col-sm-6 offset-sm-2 invoice-col float-right text-md-right"},[e("h5",[t._v(t._s(t.$t("common.client_details")))]),t._v(" "),t.allData.client?e("div",[t.allData.client.companyName?e("span",[e("strong",[t._v(t._s(t.$t("common.client_id"))+":")]),t._v("\n "+t._s(t._f("withPrefix")(t.allData.client.clientID,t.clientPrefix))),e("br")]):t._e(),t._v(" "),e("strong",[t._v(t._s(t.$t("common.client_name"))+":")]),t._v("\n "+t._s(t.allData.client.name)),e("br"),t._v(" "),t.allData.client.companyName?e("span",[e("strong",[t._v(t._s(t.$t("common.company_name"))+":")]),t._v("\n "+t._s(t.allData.client.companyName)),e("br")]):t._e(),t._v(" "),t.allData.client.email?e("span",[e("strong",[t._v(t._s(t.$t("common.email"))+":")]),t._v("\n "+t._s(t.allData.client.email)),e("br")]):t._e(),t._v(" "),t.allData.client.phoneNumber?e("span",[e("strong",[t._v(t._s(t.$t("common.contact_number"))+":")]),t._v("\n "+t._s(t.allData.client.phoneNumber)),e("br")]):t._e(),t._v(" "),t.allData.client.address?e("span",[e("strong",[t._v(t._s(t.$t("common.address"))+":")]),t._v("\n "+t._s(t.allData.client.address)),e("br")]):t._e()]):t._e()])]),t._v(" "),e("div",{staticClass:"row mt-3"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"table-responsive table-custom"},[e("table",{staticClass:"table"},[e("thead",[e("tr",[t.allData.quotationNo?e("th",[t._v("\n "+t._s(t.$t("sales.common.quotation_no"))+"\n ")]):t._e(),t._v(" "),t.allData.reference?e("th",[t._v("\n "+t._s(t.$t("common.reference"))+"\n ")]):t._e(),t._v(" "),t.allData.date?e("th",[t._v("\n "+t._s(t.$t("sales.common.quotation_date"))+"\n ")]):t._e(),t._v(" "),t.allData.deliveryPlace?e("th",[t._v("\n "+t._s(t.$t("sales.common.delivery_place"))+"\n ")]):t._e(),t._v(" "),t.allData.note?e("th",[t._v(t._s(t.$t("common.note")))]):t._e(),t._v(" "),e("th",[t._v(t._s(t.$t("common.status")))]),t._v(" "),e("th",{staticClass:"text-right"},[t._v(t._s(t.$t("common.created_by")))])])]),t._v(" "),e("tbody",[e("tr",[t.allData.quotationNo?e("td",[t._v("\n "+t._s(t._f("withPrefix")(t.allData.quotationNo,t.quotationPrefix))+"\n ")]):t._e(),t._v(" "),t.allData.reference?e("td",[t._v("\n "+t._s(t.allData.reference)+"\n ")]):t._e(),t._v(" "),t.allData.date?e("td",[t._v("\n "+t._s(t._f("moment")(t.allData.date,"Do MMM, YYYY"))+"\n ")]):t._e(),t._v(" "),t.allData.deliveryPlace?e("td",[t._v("\n "+t._s(t.allData.deliveryPlace)+"\n ")]):t._e(),t._v(" "),t.allData.note?e("td",[t._v(t._s(t.allData.note))]):t._e(),t._v(" "),e("td",[1===t.allData.status?e("span",{staticClass:"badge bg-success"},[t._v(t._s(t.$t("common.active")))]):e("span",{staticClass:"badge bg-danger"},[t._v(t._s(t.$t("common.in_active")))])]),t._v(" "),e("td",{staticClass:"text-right"},[t._v("\n "+t._s(t.allData.createdBy)+"\n ")])])])])])])]),t._v(" "),e("div",{staticClass:"row position-relative mt-4"},[e("div",{staticClass:"col-12"},[e("strong",{staticClass:"mb-2 d-block"},[t._v(t._s(t.$t("common.products"))+":")]),t._v(" "),e("div",{staticClass:"table-custom table-responsive"},[e("table",{staticClass:"table table-sm"},[e("thead",[e("tr",[e("th",[t._v(t._s(t.$t("common.s_no")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.code")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.product_name")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.quantity")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.unit_price")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.unit_tax")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.unit_cost")))]),t._v(" "),e("th",{staticClass:"text-right"},[t._v(t._s(t.$t("common.subtotal")))])])]),t._v(" "),t.allData.products?e("tbody",[t._l(t.allData.products,(function(n,r){return e("tr",{key:r},[e("td",[t._v(t._s(++r))]),t._v(" "),e("td",[t._v("\n "+t._s(t._f("withPrefix")(n.productCode,t.productPrefix))+"\n ")]),t._v(" "),e("td",[t._v(t._s(n.productName))]),t._v(" "),e("td",[t._v(t._s(n.quantity)+" "+t._s(n.productUnit))]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(n.salePrice)))]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(n.taxAmount)))]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(n.unitCost)))]),t._v(" "),e("td",{staticClass:"text-right"},[t._v("\n "+t._s(t._f("withCurrency")(n.unitCostTotal))+"\n ")])])})),t._v(" "),e("tr",[e("td",{staticClass:"text-right",attrs:{colspan:"7"}},[e("strong",[t._v(t._s(t.$t("common.subtotal")))])]),t._v(" "),e("td",{staticClass:"text-right"},[e("strong",[t._v(t._s(t._f("withCurrency")(t.allData.subTotal)))])])])],2):t._e()])])])]),t._v(" "),e("div",{staticClass:"row mt-3"},[e("div",{staticClass:"offset-xl-8 col-lg-12 col-xl-4 text-xl-right"},[e("div",{staticClass:"table-responsive table-custom table-border-y-0"},[e("table",{staticClass:"table"},[e("tbody",[e("tr",{staticClass:"bg-sub-light text-bold"},[e("th",[t._v(t._s(t.$t("common.subtotal"))+":")]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(t.allData.subTotal)))])]),t._v(" "),e("tr",[e("th",[t._v(t._s(t.$t("common.transport"))+":")]),t._v(" "),e("td",[e("span",{staticClass:"plus-sign"},[t._v("+")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.transport))+"\n ")])]),t._v(" "),e("tr",[e("th",[t._v("\n "+t._s(t.$t("common.discount"))+"\n "),t.allData.discountPercentage>0?e("span",[t._v("("+t._s(t.allData.discountPercentage)+"%)")]):t._e(),t._v(":\n ")]),t._v(" "),e("td",[e("span",{staticClass:"minus-sign"},[t._v("-")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.discount))+"\n ")])]),t._v(" "),e("tr",[e("th",[t._v(t._s(t.$t("common.tax"))+":")]),t._v(" "),e("td",[e("span",{staticClass:"plus-sign"},[t._v("+")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.totalTax))+"\n ")])]),t._v(" "),e("tr",{staticClass:"bg-indigo-light"},[e("th",[t._v(t._s(t.$t("common.total"))+":")]),t._v(" "),e("td",[e("span",{staticClass:"equal-sign"},[t._v("=")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.total))+"\n ")])])])])])])])],1)])],1)}),[],!1,null,null,null);e.default=p.exports}}]);
Simpan