⚝
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
/
qda-digital.online
/
public
/
dist
/
js
/
Edit File: 157.c88c98.js
/*! For license information please see 157.c88c98.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[157],{443:function(t,r,e){"use strict";e.r(r);var n=e(7),a=e.n(n),o=e(3);function s(t){return(s="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 i(){i=function(){return t};var t={},r=Object.prototype,e=r.hasOwnProperty,n=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(t){l=function(t,r,e){return t[r]=e}}function _(t,r,e,a){var o=r&&r.prototype instanceof v?r:v,s=Object.create(o.prototype),i=new L(a||[]);return n(s,"_invoke",{value:D(t,e,i)}),s}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=_;var h={};function v(){}function d(){}function f(){}var m={};l(m,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(E([])));g&&g!==r&&e.call(g,o)&&(m=g);var b=f.prototype=v.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function x(t,r){var a;n(this,"_invoke",{value:function(n,o){function i(){return new r((function(a,i){!function n(a,o,i,c){var u=p(t[a],t,o);if("throw"!==u.type){var l=u.arg,_=l.value;return _&&"object"==s(_)&&e.call(_,"__await")?r.resolve(_.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):r.resolve(_).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,c)}))}c(u.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function D(t,r,e){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return N()}for(e.method=a,e.arg=o;;){var s=e.delegate;if(s){var i=C(s,e);if(i){if(i===h)continue;return i}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=p(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}function C(t,r){var e=r.method,n=t.iterator[e];if(void 0===n)return r.delegate=null,"throw"===e&&t.iterator.return&&(r.method="return",r.arg=void 0,C(t,r),"throw"===r.method)||"return"!==e&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+e+"' method")),h;var a=p(n,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,h;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function P(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function $(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function E(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){for(;++n<t.length;)if(e.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=void 0,r.done=!0,r};return a.next=a}}return{next:N}}function N(){return{value:void 0,done:!0}}return d.prototype=f,n(b,"constructor",{value:f,configurable:!0}),n(f,"constructor",{value:d,configurable:!0}),d.displayName=l(f,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(r,e,n,a,o){void 0===o&&(o=Promise);var s=new x(_(r,e,n,a),o);return t.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(b),l(b,u,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=E,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 r in this)"t"===r.charAt(0)&&e.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function n(e,n){return s.type="throw",s.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var i=e.call(o,"catchLoc"),c=e.call(o,"finallyLoc");if(i&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&e.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,r){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&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),$(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var a=n.arg;$(e)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:E(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},t}function c(t,r,e,n,a,o,s){try{var i=t[o](s),c=i.value}catch(t){return void e(t)}i.done?r(c):Promise.resolve(c).then(n,a)}var u={middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("purchases.returns.view.page_title")}},data:function(){return{breadcrumbsCurrent:"purchases.returns.view.breadcrumbs_current",breadcrumbs:[{name:"purchases.returns.view.breadcrumbs_first",url:"home"},{name:"purchases.returns.view.breadcrumbs_second",url:"purchaseReturns.index"},{name:"purchases.returns.view.breadcrumbs_active",url:""}],allData:"",purchaseSubTotal:0,purchaseReturn:0,returnProducts:[],productPrefix:"",purchasePrefix:"",returnPrefix:"",supplierPrefix:"",loading:!1}},computed:Object(o.b)({appInfo:"operations/appInfo"}),created:function(){this.getInvoiceReturn(),this.productPrefix=this.appInfo.productPrefix,this.purchasePrefix=this.appInfo.purchasePrefix,this.returnPrefix=this.appInfo.purchaseReturnPrefix,this.supplierPrefix=this.appInfo.supplierPrefix},methods:{getInvoiceReturn:function(){var t,r=this;return(t=i().mark((function t(){var e,n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.loading=!0,t.next=3,a.a.get(window.location.origin+"/api/purchase-returns/"+r.$route.params.slug);case 3:e=t.sent,n=e.data,r.allData=n.data,r.returnProducts=r.allData.returnProducts,r.returnProducts.sort(r.sortProducts),r.calculateTotalAmount(),r.loading=!1;case 10:case"end":return t.stop()}}),t)})),function(){var r=this,e=arguments;return new Promise((function(n,a){var o=t.apply(r,e);function s(t){c(o,n,a,s,i,"next",t)}function i(t){c(o,n,a,s,i,"throw",t)}s(void 0)}))})()},sortProducts:function(t,r){return t.product.code<r.product.code?-1:t.product.code>r.product.code?1:0},calculateTotalAmount:function(){var t=0,r=0;this.returnProducts&&(t=this.returnProducts.reduce((function(t,r){return t+Number(r.purchasedQty)*Number(r.purchasePrice)}),0),r=this.returnProducts.reduce((function(t,r){return t+Number(r.returnQty)*Number(r.purchasePrice)}),0)),this.purchaseSubTotal=t,this.purchaseReturn=r},printWindow:function(){window.print()}}},l=e(1),_=Object(l.a)(u,(function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",[e("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12"},[e("div",{staticClass:"invoice p-3 mb-3"},[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.supplier_details")))]),t._v(" "),t.allData.purchase&&t.allData.supplier?e("div",[t.allData.supplier.companyName?e("span",[e("strong",[t._v(t._s(t.$t("common.supplier_id"))+":")]),t._v("\n "+t._s(t._f("withPrefix")(t.allData.supplier.supplierID,t.supplierPrefix))),e("br")]):t._e(),t._v(" "),e("strong",[t._v(t._s(t.$t("common.supplier_name"))+":")]),t._v("\n "+t._s(t.allData.supplier.name)),e("br"),t._v(" "),t.allData.supplier.companyName?e("span",[e("strong",[t._v(t._s(t.$t("common.company_name"))+":")]),t._v("\n "+t._s(t.allData.supplier.companyName)),e("br")]):t._e(),t._v(" "),t.allData.supplier.email?e("span",[e("strong",[t._v(t._s(t.$t("common.email"))+":")]),t._v("\n "+t._s(t.allData.supplier.email)),e("br")]):t._e(),t._v(" "),t.allData.supplier.phoneNumber?e("span",[e("strong",[t._v(t._s(t.$t("common.contact_number"))+":")]),t._v("\n "+t._s(t.allData.supplier.phoneNumber)),e("br")]):t._e(),t._v(" "),t.allData.supplier.address?e("span",[e("strong",[t._v(t._s(t.$t("common.address"))+":")]),t._v("\n "+t._s(t.allData.supplier.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"},[t.allData.purchase?e("table",{staticClass:"table"},[e("thead",[e("tr",[t.allData.purchase.code?e("th",[t._v("\n "+t._s(t.$t("purchases.list.common.purchase_no"))+"\n ")]):t._e(),t._v(" "),t.allData.returnNo?e("th",[t._v("\n "+t._s(t.$t("purchases.list.common.return_no"))+"\n ")]):t._e(),t._v(" "),t.allData.purchase.purchaseDate?e("th",[t._v("\n "+t._s(t.$t("purchases.list.common.purchase_date"))+"\n ")]):t._e(),t._v(" "),t.allData.returnDate?e("th",[t._v("\n "+t._s(t.$t("purchases.returns.common.return_date"))+"\n ")]):t._e(),t._v(" "),t.allData.reason?e("th",[t._v("\n "+t._s(t.$t("purchases.returns.common.return_reason"))+"\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(" "),t.allData.createdBy?e("th",{staticClass:"text-right"},[t._v("\n "+t._s(t.$t("common.created_by"))+"\n ")]):t._e()])]),t._v(" "),e("tbody",[e("tr",[t.allData.purchase.code?e("td",[t._v("\n "+t._s(t._f("withPrefix")(t.allData.purchase.code,t.purchasePrefix))+"\n ")]):t._e(),t._v(" "),t.allData.returnNo?e("td",[t._v("\n "+t._s(t._f("withPrefix")(t.allData.returnNo,t.returnPrefix))+"\n ")]):t._e(),t._v(" "),t.allData.purchase.purchaseDate?e("td",[t._v("\n "+t._s(t._f("moment")(t.allData.purchase.purchaseDate,"Do MMM, YYYY"))+"\n ")]):t._e(),t._v(" "),t.allData.returnDate?e("td",[t._v("\n "+t._s(t._f("moment")(t.allData.returnDate,"Do MMM, YYYY"))+"\n ")]):t._e(),t._v(" "),t.allData.reason?e("td",[t._v(t._s(t.allData.reason))]):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(" "),t.allData.createdBy?e("td",{staticClass:"text-right"},[t._v("\n "+t._s(t.allData.createdBy)+"\n ")]):t._e()])])]):t._e()])])]),t._v(" "),e("div",{staticClass:"row position-relative mt-4"},[e("table-loading",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}]}),t._v(" "),t.allData.purchase?e("div",{staticClass:"col-12 table-responsive"},[e("strong",{staticClass:"mb-2 d-block"},[t._v(t._s(t.$t("purchases.returns.common.return_products"))+":")]),t._v(" "),e("div",{staticClass:"table-custom table-responsive text-center"},[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.name")))]),t._v(" "),e("th",[t._v(t._s(t.$t("purchases.list.common.purchased_qty")))]),t._v(" "),e("th",[t._v(t._s(t.$t("purchases.list.common.returned_qty")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.purchase_price")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.total")))]),t._v(" "),e("th",{staticClass:"text-right"},[t._v("\n "+t._s(t.$t("common.total_return"))+"\n ")])])]),t._v(" "),t.returnProducts?e("tbody",[t._l(t.returnProducts,(function(r,n){return e("tr",{key:n},[e("td",[t._v(t._s(++n))]),t._v(" "),r.product?e("td",[t._v("\n "+t._s(t._f("withPrefix")(r.product.code,t.productPrefix))+"\n ")]):t._e(),t._v(" "),r.product?e("td",[t._v(t._s(r.product.name))]):t._e(),t._v(" "),r.product?e("td",[t._v("\n "+t._s(r.purchasedQty)+"\n "),r.product.itemUnit?e("span",[t._v(t._s(r.product.itemUnit.code))]):t._e()]):t._e(),t._v(" "),r.product?e("td",[t._v("\n "+t._s(r.returnQty)+"\n "),r.product.itemUnit?e("span",[t._v(t._s(r.product.itemUnit.code))]):t._e()]):t._e(),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(r.purchasePrice)))]),t._v(" "),e("td",[t._v("\n "+t._s(t._f("withCurrency")(r.purchasePrice*r.purchasedQty))+"\n ")]),t._v(" "),e("td",{staticClass:"text-right"},[t._v("\n "+t._s(t._f("withCurrency")(r.purchasePrice*r.returnQty))+"\n ")])])})),t._v(" "),e("tr",[e("td",{staticClass:"text-right",attrs:{colspan:"6"}},[e("strong",[t._v(t._s(t.$t("common.subtotal")))])]),t._v(" "),e("td",[e("strong",[t._v(t._s(t._f("withCurrency")(t.purchaseSubTotal)))])]),t._v(" "),e("td",{staticClass:"text-right"},[e("strong",[t._v(t._s(t._f("withCurrency")(t.purchaseReturn)))])])])],2):t._e()])])]):t._e()],1),t._v(" "),t.allData.purchase?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.purchase.subTotal)))])]),t._v(" "),e("tr",[e("th",[t._v(t._s(t.$t("common.return_cost"))+":")]),t._v(" "),e("td",[e("span",{staticClass:"minus-sign"},[t._v("-")]),t._v("\n "+t._s(t._f("withCurrency")(t.purchaseReturn))+"\n ")])]),t._v(" "),e("tr",[e("th",[t._v(t._s(t.$t("common.discount"))+":")]),t._v(" "),e("td",[e("span",{staticClass:"minus-sign"},[t._v("-")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.purchase.totalDiscount))+"\n ")])]),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.purchase.transport))+"\n ")])]),t._v(" "),e("tr",[e("th",[t._v("\n "+t._s(t.$t("common.tax"))+"\n "),e("span",[t._v("("+t._s(t.allData.purchase.taxRate)+"%):")])]),t._v(" "),e("td",[e("span",{staticClass:"plus-sign"},[t._v("+")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.purchase.tax))+"\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.purchase.purchaseTotal))+"\n ")])]),t._v(" "),e("tr",[e("th",[t._v(t._s(t.$t("common.total_paid"))+":")]),t._v(" "),e("td",[e("span",{staticClass:"minus-sign"},[t._v("-")]),t._v("\n "+t._s(t._f("withCurrency")(t.allData.purchase.totalPaid))+"\n ")])]),t._v(" "),e("tr",{staticClass:"bg-red-light"},[e("th",[t._v(t._s(t.$t("common.due"))+":")]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(t.allData.purchase.due)))])]),t._v(" "),t.allData.accountReceivable?e("tr",{staticClass:"bg-green-light"},[e("th",[t._v(t._s(t.$t("common.account_receivable"))+":")]),t._v(" "),e("td",[t._v("\n "+t._s(t._f("withCurrency")(t.allData.accountReceivable.amount))+"\n ")])]):t._e()])])])])]):t._e(),t._v(" "),e("div",{staticClass:"row no-print mt-5"},[e("div",{staticClass:"col-12"},[e("router-link",{staticClass:"btn btn-dark float-right",attrs:{to:{name:"purchaseReturns.index"}}},[e("i",{staticClass:"fas fa-long-arrow-alt-left"}),t._v(" "+t._s(t.$t("common.back"))+"\n ")]),t._v(" "),e("a",{staticClass:"btn btn-default",attrs:{href:"#"},on:{click:t.printWindow}},[e("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.$t("common.print")))])],1)])])])])],1)}),[],!1,null,null,null);r.default=_.exports}}]);
Simpan