⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.45
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
/
invoice
/
public
/
dist
/
js
/
Edit File: 163.ca6510.js
/*! For license information please see 163.ca6510.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[163],{460:function(t,e,n){"use strict";n.r(e);var r=n(7),a=n.n(r),o=n(3);function i(t){return(i="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 s(){s=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function v(t,e,n,a){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),s=new L(a||[]);return r(i,"_invoke",{value:C(t,n,s)}),i}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=v;var d={};function f(){}function h(){}function m(){}var p={};u(p,o,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(N([])));b&&b!==e&&n.call(b,o)&&(p=b);var g=m.prototype=f.prototype=Object.create(p);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var a;r(this,"_invoke",{value:function(r,o){function s(){return new e((function(a,s){!function r(a,o,s,c){var l=_(t[a],t,o);if("throw"!==l.type){var u=l.arg,v=u.value;return v&&"object"==i(v)&&n.call(v,"__await")?e.resolve(v.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(v).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}(r,o,a,s)}))}return a=a?a.then(s,s):s()}})}function C(t,e,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return E()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=D(i,n);if(s){if(s===d)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=_(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)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")),d;var a=_(r,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,d;var o=a.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}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 L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=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 a.next=a}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=m,r(g,"constructor",{value:m,configurable:!0}),r(m,"constructor",{value:h,configurable:!0}),h.displayName=u(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,l,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(x.prototype),u(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new x(v(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),u(g,l,"Generator"),u(g,o,(function(){return this})),u(g,"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=N,L.prototype={constructor:L,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 a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):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),d},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),d}},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 a=r.arg;$(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function c(t,e,n,r,a,o,i){try{var s=t[o](i),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var l={middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("sales.returns.view.page_title")}},data:function(){return{breadcrumbsCurrent:"sales.returns.view.breadcrumbs_current",breadcrumbs:[{name:"sales.returns.view.breadcrumbs_first",url:"home"},{name:"sales.returns.view.breadcrumbs_second",url:"invoiceReturns.index"},{name:"sales.returns.view.breadcrumbs_active",url:""}],allData:"",invoiceSubTotal:0,invoiceReturn:0,returnProducts:[],productPrefix:"",invoicePrefix:"",returnPrefix:"",clientPrefix:"",loading:!1}},computed:Object(o.b)({appInfo:"operations/appInfo"}),created:function(){this.getInvoiceReturn(),this.productPrefix=this.appInfo.productPrefix,this.invoicePrefix=this.appInfo.invoicePrefix,this.returnPrefix=this.appInfo.invoiceReturnPrefix,this.clientPrefix=this.appInfo.clientPrefix},methods:{getInvoiceReturn:function(){var t,e=this;return(t=s().mark((function t(){var n,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,a.a.get(window.location.origin+"/api/invoice-returns/"+e.$route.params.slug);case 3:n=t.sent,r=n.data,e.allData=r.data,e.returnProducts=e.allData.invoiceReturnProducts,e.returnProducts.sort(e.sortProducts),e.calculateTotalAmount(),e.loading=!1;case 10:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(t){c(o,r,a,i,s,"next",t)}function s(t){c(o,r,a,i,s,"throw",t)}i(void 0)}))})()},sortProducts:function(t,e){return t.productCode<e.productCode?-1:t.productCode>e.productCode?1:0},calculateTotalAmount:function(){var t=0,e=0;this.allData.invoiceReturnProducts&&(t=this.allData.invoiceReturnProducts.reduce((function(t,e){return t+Number(e.invoiceQty)*Number(e.salePrice)}),0),e=this.allData.invoiceReturnProducts.reduce((function(t,e){return t+Number(e.returnQty)*Number(e.salePrice)}),0)),this.invoiceSubTotal=t,this.invoiceReturn=e},printWindow:function(){window.print()}}},u=n(1),v=Object(u.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-lg-12"},[n("div",{staticClass:"invoice p-3 mb-3"},[n("div",{staticClass:"row invoice-info"},[n("div",{staticClass:"col-sm-4 invoice-col"},[n("CompanyInfo")],1),t._v(" "),n("div",{staticClass:"col-sm-6 offset-sm-2 invoice-col float-right text-md-right"},[n("h5",[t._v(t._s(t.$t("common.client_details")))]),t._v(" "),t.allData.client?n("div",[t.allData.client.companyName?n("span",[n("strong",[t._v(t._s(t.$t("common.client_id"))+":")]),t._v("\n "+t._s(t._f("withPrefix")(t.allData.client.clientID,t.clientPrefix))),n("br")]):t._e(),t._v(" "),n("strong",[t._v(t._s(t.$t("common.client_name"))+":")]),t._v("\n "+t._s(t.allData.client.name)),n("br"),t._v(" "),t.allData.client.companyName?n("span",[n("strong",[t._v(t._s(t.$t("common.company_name"))+":")]),t._v("\n "+t._s(t.allData.client.companyName)),n("br")]):t._e(),t._v(" "),t.allData.client.email?n("span",[n("strong",[t._v(t._s(t.$t("common.email"))+":")]),t._v("\n "+t._s(t.allData.client.email)),n("br")]):t._e(),t._v(" "),t.allData.client.contactNumber?n("span",[n("strong",[t._v(t._s(t.$t("common.contact_number"))+":")]),t._v("\n "+t._s(t.allData.client.contactNumber)),n("br")]):t._e(),t._v(" "),t.allData.client.address?n("span",[n("strong",[t._v(t._s(t.$t("common.address"))+":")]),t._v("\n "+t._s(t.allData.client.address)),n("br")]):t._e()]):t._e()])]),t._v(" "),n("div",{staticClass:"row mt-3"},[n("div",{staticClass:"col-12"},[n("div",{staticClass:"table-custom table-responsive"},[t.allData.invoice?n("table",{staticClass:"table table-bordered"},[n("thead",[n("tr",[t.allData.invoice.invoiceNo?n("th",[t._v("\n "+t._s(t.$t("common.invoice_no"))+"\n ")]):t._e(),t._v(" "),t.allData.returnNo?n("th",[t._v("\n "+t._s(t.$t("common.return_no"))+"\n ")]):t._e(),t._v(" "),t.allData.invoice.invoiceDate?n("th",[t._v("\n "+t._s(t.$t("common.invoice_date"))+"\n ")]):t._e(),t._v(" "),t.allData.returnDate?n("th",[t._v("\n "+t._s(t.$t("sales.common.return_date"))+"\n ")]):t._e(),t._v(" "),t.allData.reason?n("th",[t._v("\n "+t._s(t.$t("common.return_reason"))+"\n ")]):t._e(),t._v(" "),t.allData.note?n("th",[t._v(t._s(t.$t("common.note")))]):t._e(),t._v(" "),n("th",[t._v(t._s(t.$t("common.status")))]),t._v(" "),t.allData.createdBy?n("th",{staticClass:"text-right"},[t._v("\n "+t._s(t.$t("common.created_by"))+"\n ")]):t._e()])]),t._v(" "),n("tbody",[n("tr",[t.allData.invoice.invoiceNo?n("td",[t._v("\n "+t._s(t._f("withPrefix")(t.allData.invoice.invoiceNo,t.invoicePrefix))+"\n ")]):t._e(),t._v(" "),t.allData.returnNo?n("td",[t._v("\n "+t._s(t._f("withPrefix")(t.allData.returnNo,t.returnPrefix))+"\n ")]):t._e(),t._v(" "),t.allData.invoice.invoiceDate?n("td",[t._v("\n "+t._s(t._f("moment")(t.allData.invoice.invoiceDate,"Do MMM, YYYY"))+"\n ")]):t._e(),t._v(" "),t.allData.returnDate?n("td",[t._v("\n "+t._s(t._f("moment")(t.allData.returnDate,"Do MMM, YYYY"))+"\n ")]):t._e(),t._v(" "),t.allData.reason?n("td",[t._v(t._s(t.allData.reason))]):t._e(),t._v(" "),t.allData.note?n("td",[t._v(t._s(t.allData.note))]):t._e(),t._v(" "),n("td",[1===t.allData.status?n("span",{staticClass:"badge bg-success"},[t._v(t._s(t.$t("common.active")))]):n("span",{staticClass:"badge bg-danger"},[t._v(t._s(t.$t("common.in_active")))])]),t._v(" "),t.allData.createdBy?n("td",{staticClass:"text-right"},[t._v("\n "+t._s(t.allData.createdBy)+"\n ")]):t._e()])])]):t._e()])])]),t._v(" "),n("div",{staticClass:"row position-relative mt-4 mb-4"},[n("table-loading",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}]}),t._v(" "),n("div",{staticClass:"col-12"},[n("strong",{staticClass:"mt-3"},[t._v(t._s(t.$t("common.return_products"))+":")]),t._v(" "),t.allData.invoice?n("div",{staticClass:"table-custom table-responsive text-center"},[n("table",{staticClass:"table table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.$t("common.s_no")))]),t._v(" "),n("th",[t._v(t._s(t.$t("common.code")))]),t._v(" "),n("th",[t._v(t._s(t.$t("common.product_name")))]),t._v(" "),n("th",[t._v(t._s(t.$t("common.invoice_qty")))]),t._v(" "),n("th",[t._v(t._s(t.$t("common.return_qty")))]),t._v(" "),n("th",[t._v(t._s(t.$t("common.unit_price")))]),t._v(" "),n("th",[t._v(t._s(t.$t("common.subtotal")))]),t._v(" "),n("th",{staticClass:"text-right"},[t._v("\n "+t._s(t.$t("common.total_return"))+"\n ")])])]),t._v(" "),t.returnProducts?n("tbody",[t._l(t.returnProducts,(function(e,r){return n("tr",{key:r},[n("td",[t._v(t._s(++r))]),t._v(" "),n("td",[t._v("\n "+t._s(t._f("withPrefix")(e.productCode,t.productPrefix))+"\n ")]),t._v(" "),n("td",[t._v(t._s(e.productName))]),t._v(" "),n("td",[t._v(t._s(e.invoiceQty)+" "+t._s(e.productUnit))]),t._v(" "),n("td",[t._v(t._s(e.returnQty)+" "+t._s(e.productUnit))]),t._v(" "),n("td",[t._v(t._s(t._f("withCurrency")(e.salePrice)))]),t._v(" "),n("td",[t._v("\n "+t._s(t._f("withCurrency")(e.salePrice*e.invoiceQty))+"\n ")]),t._v(" "),n("td",{staticClass:"text-right"},[t._v("\n "+t._s(t._f("withCurrency")(e.salePrice*e.returnQty))+"\n ")])])})),t._v(" "),n("tr",[n("td",{staticClass:"text-right",attrs:{colspan:"6"}},[n("strong",[t._v(t._s(t.$t("common.subtotal")))])]),t._v(" "),n("td",[n("strong",[t._v(t._s(t._f("withCurrency")(t.allData.invoice.subTotal)))])]),t._v(" "),n("td",{staticClass:"text-right"},[n("strong",[t._v(t._s(t._f("withCurrency")(t.invoiceReturn)))])])])],2):t._e()])]):t._e()])],1),t._v(" "),t.allData.invoice?n("div",{staticClass:"row mt-3"},[n("div",{staticClass:"offset-xl-8 col-lg-12 col-xl-4 text-lg-right"},[n("div",{staticClass:"table-responsive table-custom table-border-y-0"},[n("table",{staticClass:"table"},[n("tbody",[n("tr",{staticClass:"bg-sub-light text-bold"},[n("th",[t._v(t._s(t.$t("common.subtotal"))+":")]),t._v(" "),n("td",[t._v(t._s(t._f("withCurrency")(t.allData.invoice.subTotal)))])]),t._v(" "),n("tr",[n("th",[t._v(t._s(t.$t("common.return_cost"))+":")]),t._v(" "),n("td",[n("span",{staticClass:"minus-sign"},[t._v("-")]),t._v("\n "+t._s(t._f("withCurrency")(t.invoiceReturn))+"\n ")])]),t._v(" "),n("tr",[n("th",[t._v(t._s(t.$t("common.discount"))+":")]),t._v(" "),n("td",[n("span",{staticClass:"minus-sign"},[t._v("-")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.invoice.discount))+"\n ")])]),t._v(" "),n("tr",[n("th",[t._v(t._s(t.$t("common.transport"))+":")]),t._v(" "),n("td",[n("span",{staticClass:"plus-sign"},[t._v("+")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.invoice.transport))+"\n ")])]),t._v(" "),n("tr",[n("th",[t._v(t._s(t.$t("common.tax"))+":")]),t._v(" "),n("td",[n("span",{staticClass:"plus-sign"},[t._v("+")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.invoice.tax))+"\n ")])]),t._v(" "),n("tr",{staticClass:"bg-indigo-light"},[n("th",[t._v(t._s(t.$t("common.total"))+":")]),t._v(" "),n("td",[n("span",{staticClass:"equal-sign"},[t._v("=")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.invoice.subTotal-t.invoiceReturn-t.allData.invoice.discount+t.allData.invoice.transport+t.allData.invoice.tax))+"\n ")])]),t._v(" "),n("tr",[n("th",[t._v(t._s(t.$t("common.total_paid"))+":")]),t._v(" "),n("td",[n("span",{staticClass:"minus-sign"},[t._v("-")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.invoice.totalPaid))+"\n ")])]),t._v(" "),n("tr",{staticClass:"bg-red-light"},[n("th",[t._v(t._s(t.$t("common.due"))+":")]),t._v(" "),n("td",[t._v(t._s(t._f("withCurrency")(t.allData.invoice.due)))])]),t._v(" "),t.allData.accountPayable?n("tr",{staticClass:"bg-green-light"},[n("th",[t._v(t._s(t.$t("common.account_payable"))+":")]),t._v(" "),n("td",[t._v("\n "+t._s(t._f("withCurrency")(t.allData.accountPayable.amount))+"\n ")])]):t._e()])])])])]):t._e(),t._v(" "),n("div",{staticClass:"row no-print mt-5"},[n("div",{staticClass:"col-12"},[n("router-link",{staticClass:"btn btn-dark float-right",attrs:{to:{name:"invoiceReturns.index"}}},[n("i",{staticClass:"fas fa-long-arrow-alt-left"}),t._v(" "+t._s(t.$t("common.back"))+"\n ")]),t._v(" "),n("a",{staticClass:"btn btn-default",attrs:{href:"#"},on:{click:t.printWindow}},[n("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.$t("common.print")))])],1)])])])])],1)}),[],!1,null,"63d3ad8a",null);e.default=v.exports}}]);
Simpan