⚝
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: 44.55abca.js
/*! For license information please see 44.55abca.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[44],{526:function(t,e,r){"use strict";r.r(e);var o=r(5),a=r(3),n=r.n(a),i=r(4),s=r(168),c=r.n(s),l=r(621),d=r.n(l);function u(t){return(u="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 p(){p=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},n=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,a){var n=e&&e.prototype instanceof f?e:f,i=Object.create(n.prototype),s=new $(a||[]);return o(i,"_invoke",{value:C(t,r,s)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var m={};function f(){}function v(){}function h(){}var g={};c(g,n,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(S([])));b&&b!==e&&r.call(b,n)&&(g=b);var y=h.prototype=f.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var a;o(this,"_invoke",{value:function(o,n){function i(){return new e((function(a,i){!function o(a,n,i,s){var c=d(t[a],t,n);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==u(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){o("next",t,i,s)}),(function(t){o("throw",t,i,s)})):e.resolve(p).then((function(t){l.value=t,i(l)}),(function(t){return o("throw",t,i,s)}))}s(c.arg)}(o,n,a,i)}))}return a=a?a.then(i,i):i()}})}function C(t,e,r){var o="suspendedStart";return function(a,n){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===a)throw n;return N()}for(r.method=a,r.arg=n;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var c=d(t,e,r);if("normal"===c.type){if(o=r.done?"completed":"suspendedYield",c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o="completed",r.method="throw",r.arg=c.arg)}}}function P(t,e){var r=e.method,o=t.iterator[r];if(void 0===o)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,m;var n=a.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,m):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function k(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(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:void 0,done:!0}}return v.prototype=h,o(y,"constructor",{value:h,configurable:!0}),o(h,"constructor",{value:v,configurable:!0}),v.displayName=c(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"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(y),t},t.awrap=function(t){return{__await:t}},x(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,o,a,n){void 0===n&&(n=Promise);var i=new w(l(e,r,o,a),n);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(y),c(y,s,"Generator"),c(y,n,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var o in e)r.push(o);return r.reverse(),function t(){for(;r.length;){var o=r.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},t.values=S,$.prototype={constructor:$,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),!t)for(var e in this)"t"===e.charAt(0)&&r.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 o(r,o){return i.type="throw",i.arg=t,e.next=r,o&&(e.method="next",e.arg=void 0),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a],i=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var s=r.call(n,"catchLoc"),c=r.call(n,"finallyLoc");if(s&&c){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(s){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return o(n.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=t,i.arg=e,n?(this.method="next",this.next=n.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var a=o.arg;T(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),m}},t}function m(t,e,r,o,a,n,i){try{var s=t[n](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(o,a)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(o,a){var n=t.apply(e,r);function i(t){m(n,o,a,i,s,"next",t)}function s(t){m(n,o,a,i,s,"throw",t)}i(void 0)}))}}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var g={middleware:["auth"],metaInfo:function(){return{title:this.$t("pos.page_title")}},components:{barcode:c.a},data:function(){return{breadcrumbsCurrent:"pos.breadcrumbs_current",breadcrumbs:[{name:"pos.breadcrumbs_first",url:"home"},{name:"pos.breadcrumbs_second",url:"invoices.index"},{name:"pos.breadcrumbs_active",url:""}],form:new o.a({invoiceNo:"",client:"",reference:"",selectedProducts:[],subTotal:0,netTotal:0,discountType:0,discount:"",totalDiscount:"",transportCost:"",orderTax:"",totalTax:0,productTotalTax:0,account:"",totalPaid:"",dueAmount:"",poReference:"",paymentTerms:"",deliveryPlace:"",addPayment:"",chequeNo:"",receiptNo:"",date:(new Date).toISOString().slice(0,10),note:"",status:1,category:"",invoice_id:null,invoice_slug:null}),taxes:[],audio:"",products:"",accounts:"",categories:[],subCategories:[],productPrefix:"",invoicePrefix:"",showModal:!1,allData:{},showSmallInvoiceModal:!1,printMe:!1,perPage:10,pagination:"",query:"",generateOrder:!1,clickCount:0,clients:[]}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(i.b)("operations",["items","appInfo"])),mounted:function(){var t=this;window.addEventListener("keypress",(function(e){t.form.netTotal>0&&0==t.showModal&&0==t.generateOrder&&"Enter"===e.key&&(t.generateOrder=!0,t.completeOrderAndAddPayment()),t.form.netTotal>0&&t.form.paidAmount>0&&1==t.generateOrder&&"Enter"===e.key&&(t.clickCount++,t.showModal=!1,console.log("from second click",t.clickCount),1==t.clickCount?t.addPayment():t.printInvoice())}))},created:function(){this.getClients(),this.getProducts(),this.getAccounts(),this.getTaxes(),this.getCategories(),this.getSubCategories(),this.audio=new Audio(d.a),this.productPrefix=this.appInfo.productPrefix,this.invoicePrefix=this.appInfo.invoicePrefix,document.body.classList.add("sidebar-collapse")},watch:{query:function(t,e){""==t?this.getProducts():this.searchProducts()}},methods:{doThis:function(){console.log("do this")},getClients:function(){var t=this;return f(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.a.get("/api/all-clients").then((function(e){var r=e.data;if(t.clients=r.data,t.clients&&t.clients.length>0){var o=t.appInfo.defaultClientSlug;t.form.client=t.clients.find((function(t){return t.slug===o}))}})).catch((function(t){return console.log(t)}));case 2:case"end":return e.stop()}}),e)})))()},getAccounts:function(){var t=this;return f(p().mark((function e(){var r,o,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.a.get(window.location.origin+"/api/all-accounts");case 2:r=e.sent,o=r.data,t.accounts=o.data,t.accounts&&t.accounts.length>0&&(a=t.appInfo.defaultAccountSlug,t.form.account=t.accounts.find((function(t){return t.slug==a})));case 6:case"end":return e.stop()}}),e)})))()},getTaxes:function(){var t=this;return f(p().mark((function e(){var r,o,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.a.get(window.location.origin+"/api/all-vat-rates");case 2:r=e.sent,o=r.data,t.taxes=o.data,t.taxes&&t.taxes.length>0&&(a=t.appInfo.defaultVatRateSlug,t.form.orderTax=t.taxes.find((function(t){return t.slug===a})));case 6:case"end":return e.stop()}}),e)})))()},getCategories:function(){var t=this;return f(p().mark((function e(){var r,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.a.get(window.location.origin+"/api/all-product-categories");case 2:r=e.sent,o=r.data,t.categories=o.data;case 5:case"end":return e.stop()}}),e)})))()},getSubCategories:function(){var t=this;return f(p().mark((function e(){var r,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.a.get(window.location.origin+"/api/all-product-sub-categories");case 2:r=e.sent,o=r.data,t.subCategories=o.data;case 5:case"end":return e.stop()}}),e)})))()},getInvoice:function(t){var e=this;return f(p().mark((function r(){var o,a;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.loading=!0,r.next=3,n.a.get(window.location.origin+"/api/invoices/"+t);case 3:o=r.sent,a=o.data,e.allData=a.data,e.invoiceProducts=e.allData.invoiceProducts,e.invoiceProducts.sort(e.sortProducts),e.loading=!1;case 9:case"end":return r.stop()}}),r)})))()},getProducts:function(){var t=this;return f(p().mark((function e(){var r,o,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.pagination?t.pagination.current_page:1,e.next=3,n.a.get(window.location.origin+"/api/all-products-paginated?page="+r);case 3:o=e.sent,a=o.data,t.products=a.data,t.products.sort(t.sortProducts),t.pagination=a.meta;case 8:case"end":return e.stop()}}),e)})))()},sortProducts:function(t,e){return Number(t.code)<Number(e.code)?-1:Number(t.code)>Number(e.code)?1:0},getSubCategoriesByCategory:function(){var t=this;return f(p().mark((function e(){var r,o,a,i,s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.pagination?t.pagination.current_page:1,t.subCategories=[],t.form.subCategory="",!(a=null===(r=t.form.category)||void 0===r?void 0:r.slug)){e.next=13;break}return e.next=7,n.a.get(window.location.origin+"/api/all-pro-sub-categories-by-category/"+a+"?page="+o);case 7:i=e.sent,s=i.data,t.subCategories=s.cats,t.products=s.products,e.next=17;break;case 13:return e.next=15,t.getSubCategories();case 15:return e.next=17,t.getProducts();case 17:case"end":return e.stop()}}),e)})))()},getProductsBySubCategory:function(){var t=this;return f(p().mark((function e(){var r,o,a,i,s,c,l;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.pagination?t.pagination.current_page:1,t.products=[],t.form.itemName="",i=null===(r=t.form.category)||void 0===r?void 0:r.slug,s=null===(o=t.form.subCategory)||void 0===o?void 0:o.slug,!i||!s){e.next=14;break}return e.next=8,n.a.get(window.location.origin+"/api/all-products-by-sub-categories/"+i+"/"+s+"?page="+a);case 8:c=e.sent,l=c.data,t.products=l.data,t.pagination=l.meta,e.next=16;break;case 14:return e.next=16,t.getProducts();case 16:case"end":return e.stop()}}),e)})))()},paginate:function(){var t=this;return f(p().mark((function e(){var r,o,a,n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(r=t.form.category)||void 0===r?void 0:r.slug,n=null===(o=t.form.subCategory)||void 0===o?void 0:o.slug,""!==t.query){e.next=17;break}if(!a){e.next=8;break}return e.next=6,t.getSubCategoriesByCategory();case 6:e.next=15;break;case 8:if(!a||!n){e.next=13;break}return e.next=11,t.getProductsBySubCategory();case 11:e.next=15;break;case 13:return e.next=15,t.getProducts();case 15:e.next=19;break;case 17:return e.next=19,t.searchProducts();case 19:case"end":return e.stop()}}),e)})))()},resetPagination:function(){var t=this;return f(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.pagination&&(t.pagination.current_page=1),e.next=3,t.searchProducts();case 3:case"end":return e.stop()}}),e)})))()},searchProducts:function(){var t=this;return f(p().mark((function e(){var r,o,a,i,s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.form.category?t.form.category.slug:"",o=t.form.subCategory?t.form.subCategory.slug:"",t.$store.state.operations.loading=!0,a=t.pagination?t.pagination.current_page:1,e.next=6,n.a.get(window.location.origin+"/api/products/search-from-pos?term="+t.query+"&page="+a+"&perPage="+t.perPage+"&catSlug="+r+"&SubCatSlug="+o);case 6:i=e.sent,s=i.data,t.products=s.data,t.products.sort(t.sortProducts),t.pagination=s.meta,console.log(t.pagination);case 12:case"end":return e.stop()}}),e)})))()},reload:function(){var t=this;return f(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.query="",e.next=3,t.searchProducts();case 3:case"end":return e.stop()}}),e)})))()},storeProduct:function(t){var e=this.form.selectedProducts.findIndex((function(e){return e.id==t.id})),r=1;if(t.inventoryCount>=r){if(-1!==e){r=this.form.selectedProducts[e].qty,this.audio.play(),this.generateItemTotal(r,"qty",e,"increment");var o=this.form.selectedProducts[e].unitPrice;return void this.generateItemTotal(o,"price",e,"increment")}var a="Exclusive"==t.taxType?t.priceWithDiscount*(t.taxRate/100):t.priceWithDiscount-t.priceWithDiscount/(1+t.taxRate/100),n=a*r;this.form.selectedProducts.unshift({id:t.id,slug:t.slug,name:t.name,code:t.code,taxType:t.taxType,taxRate:t.taxRate,qty:r,inventoryCount:t.inventoryCount,avgPurchasePrice:t.avgPurchasePrice,unitPrice:t.priceWithDiscount,unitCost:"Exclusive"==t.taxType?t.priceWithDiscount+a:t.priceWithDiscount,totalPrice:"Exclusive"==t.taxType?1*(t.priceWithDiscount+n):1*t.priceWithDiscount,productTax:t.productTax>0?t.productTax:0,totalTax:n}),this.audio.play()}else toast.fire({type:"error",title:this.$t("common.insufficient_stock")});this.generateItemTotal(r,"qty",e,"")},generateItemTotal:function(t,e,r,o){var a=this.form.selectedProducts[r];a&&("qty"==e?(a.qty=t,a.inventoryCount>=t?"increment"==o?a.qty=Number(a.qty)+1:"decrement"==o&&(a.qty=Number(a.qty)-1):(a.qty=1,toast.fire({type:"error",title:this.$t("pos.not_enough_items")}))):(a.unitPrice=t,("increment"==o||"decrement"==o&&a.unitPrice>0)&&(a.unitPrice=Number(a.unitPrice))),a.productTax="Exclusive"==a.taxType?a.unitPrice*(a.taxRate/100):a.unitPrice-a.unitPrice/(1+a.taxRate/100),a.totalTax=a.productTax*a.qty,a.totalPrice="Exclusive"==a.taxType?a.qty*a.unitPrice+a.totalTax:a.qty*a.unitPrice,a.unitCost="Exclusive"==a.taxType?Number(a.unitPrice)+Number(a.productTax):a.unitPrice,this.form.selectedProducts[r]=a),this.calculateSum()},removeItem:function(t){var e=this.form.selectedProducts.indexOf(t);e>-1&&this.form.selectedProducts.splice(e,1),this.calculateSum()},calculateSum:function(){if(this.form.subTotal=this.form.selectedProducts.reduce((function(t,e){return Number((t+e.totalPrice).toFixed(2))}),0),this.form.productTotalTax=this.form.selectedProducts.reduce((function(t,e){return Number((t+e.totalTax).toFixed(2))}),0),this.form.netTotal=this.form.subTotal,this.form.totalTax=0,this.form.orderTax&&(this.form.totalTax=this.form.orderTax.rate/100*this.form.subTotal),this.form.subTotal>0){var t=Number(this.form.discount);1==this.form.discountType?(t=t/100*this.form.subTotal,this.form.totalDiscount=Number(t.toFixed(2))):t=Number(this.form.discount),this.form.netTotal=this.form.subTotal+Number(this.form.transportCost)-t+this.form.totalTax}},saveInvoice:function(){var t=arguments,e=this;return f(p().mark((function r(){var o;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=!(t.length>0&&void 0!==t[0])||t[0],r.next=3,e.form.post(window.location.origin+"/api/invoices").then((function(t){var r=t.data;e.form.invoice_id=r.data.invoice_id,e.form.invoice_slug=r.data.invoice_slug,o&&e.showInvoiceAndPrint()})).catch((function(){toast.fire({type:"error",title:e.$t("common.error_msg")})}));case 3:case"end":return r.stop()}}),r)})))()},addPayment:function(){var t=this;return f(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t.form.invoice_id){e.next=5;break}return e.next=3,t.form.post(window.location.origin+"/api/invoices-pay").then(f(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.showModal=!1,e.next=3,t.showInvoiceAndPrint();case 3:t.form.reset(),t.againDefaultSettings();case 5:case"end":return e.stop()}}),e)})))).catch((function(){toast.fire({type:"error",title:t.$t("common.error_msg")})}));case 3:e.next=7;break;case 5:return e.next=7,toast.fire({type:"error",title:t.$t("common.error_msg")});case 7:case"end":return e.stop()}}),e)})))()},closeModalAndClearFormData:function(){this.showModal=!1,this.generateOrder=!1,this.form.reset(),this.againDefaultSettings()},closeReceiptModal:function(){this.showSmallInvoiceModal=!1,this.form.reset(),this.againDefaultSettings(),this.clickCount=0,console.log("from close"+this.clickCount)},completeOrderAndAddPayment:function(){var t=this;return f(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.saveInvoice(!1);case 2:null!=t.form.invoice_id&&(t.showModal=!0,t.form.paidAmount=t.form.netTotal.toFixed(2),t.$nextTick((function(){return t.$refs.paidAmountInput.focus()})));case 3:case"end":return e.stop()}}),e)})))()},showInvoiceAndPrint:function(){var t=this;return f(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getInvoice(t.form.invoice_slug);case 2:t.form.reset(),t.againDefaultSettings(),t.showSmallInvoiceModal=!0,setTimeout((function(){return t.printInvoice()}),500);case 6:case"end":return e.stop()}}),e)})))()},printInvoice:function(){var t=document.getElementById("invoice-POS").innerHTML,e=window.open("","","height=500, width=500");e.document.write('<link rel="stylesheet" href="/css/pos_print.css"><html>'),e.document.write("<body >"),e.document.write(t),e.document.write("</body></html>"),e.document.close(),e.print()},againDefaultSettings:function(){this.getAccounts(),this.getClients(),this.getTaxes(),this.showModal=!1,this.generateOrder=!1}}},_=(r(738),r(1)),b=Object(_.a)(g,(function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"pos"}},[e("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),e("div",{staticClass:"row sm-col-reverse"},[e("div",{staticClass:"col-12 col-md-5"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body-l p-0"},[e("div",{staticClass:"form-group pl-3 pt-3 pr-3"},[e("div",{staticClass:"d-flex w-100"},[e("v-select",{staticClass:"flex-grow-1",class:{"is-invalid":t.form.errors.has("client")},attrs:{options:t.clients,label:"name",name:"client",placeholder:t.$t("common.client_placeholder")},model:{value:t.form.client,callback:function(e){t.$set(t.form,"client",e)},expression:"form.client"}}),t._v(" "),e("ClientCreateModal",{on:{reloadClients:t.getClients}},[e("div",{staticClass:"input-group-text create-btn"},[e("i",{staticClass:"fas fa-solid fa-plus-circle"})])])],1),t._v(" "),e("has-error",{attrs:{form:t.form,field:"client"}})],1),t._v(" "),e("div",{staticClass:"table-responsive table-wrap"},[e("table",{staticClass:"table table-striped"},[e("thead",[e("tr",[e("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.product")))]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.price")))]),t._v(" "),e("th",{staticClass:"text-center",attrs:{scope:"col"}},[t._v("\n "+t._s(t.$t("common.quantity"))+"\n ")]),t._v(" "),e("th",{staticClass:"text-center",attrs:{scope:"col"}},[t._v("\n "+t._s(t.$t("common.subtotal"))+"\n ")]),t._v(" "),e("th",{staticClass:"text-center",attrs:{scope:"col"}},[t._v("\n "+t._s(t.$t("common.action"))+"\n ")])])]),t._v(" "),t.form.selectedProducts&&t.form.selectedProducts.length>0?e("tbody",t._l(t.form.selectedProducts,(function(r,o){return e("tr",{key:o},[e("td",[t._v(t._s(r.name))]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(r.unitPrice)))]),t._v(" "),e("td",[e("div",{staticClass:"d-flex custom-qty-input"},[e("input",{staticClass:"button-minus icon-shape icon-sm btn-danger",attrs:{type:"button",value:"-","data-field":"quantity"},on:{click:function(e){return t.generateItemTotal(r.qty,"qty",o,"decrement")}}}),t._v(" "),e("input",{staticClass:"quantity-field border-0 incrementor",attrs:{type:"number",step:"any",id:"Qty-".concat(o),name:"quantity",required:"",min:"1",max:r.inventoryCount,placeholder:"Quantity"},domProps:{value:r.qty},on:{change:function(e){return t.generateItemTotal(e.target.value,"qty",o,"")},keyup:function(e){return t.generateItemTotal(e.target.value,"qty",o,"")}}}),t._v(" "),e("input",{staticClass:"button-plus icon-shape icon-sm btn-primary",attrs:{type:"button",value:"+","data-field":"quantity"},on:{click:function(e){return t.generateItemTotal(r.qty,"qty",o,"increment")}}})])]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(r.totalPrice)))]),t._v(" "),e("td",{staticClass:"text-right"},[e("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeItem(r)}}},[e("i",{staticClass:"fas fa-times"})])])])})),0):e("tbody",[e("tr",{staticClass:"text-center"},[e("td",{attrs:{colspan:"5"}},[t._v(t._s(t.$t("no_data_found")))])])])])])])]),t._v(" "),e("div",{staticClass:"pos-card-footer bg-white"},[e("div",[e("div",{staticClass:"row pt-3 pl-3 pr-3"},[e("div",{staticClass:"form-group col-md-6 col-lg-6"},[e("label",{attrs:{for:"discountType"}},[t._v(t._s(t.$t("common.discount_type")))]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.discountType,expression:"form.discountType"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("discountType")},attrs:{id:"discountType",step:"any",name:"discountType"},on:{change:[function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"discountType",e.target.multiple?r:r[0])},t.calculateSum],keyup:t.calculateSum}},[e("option",{attrs:{value:"0"}},[t._v(t._s(t.$t("common.fixed")))]),t._v(" "),e("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("common.percentage"))+"(%)")])]),t._v(" "),e("has-error",{attrs:{form:t.form,field:"discountType"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6 col-lg-6"},[e("label",{attrs:{for:"discount"}},[t._v(t._s(t.$t("common.discount"))+"\n "),1==t.form.discountType?e("span",[t._v("(%)")]):t._e()]),t._v(" "),e("div",{staticClass:"input-group"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.discount,expression:"form.discount"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("discount")},attrs:{id:"discount",type:"number",step:"any",min:"1",max:1==t.form.discountType?100:t.form.subTotal,name:"discount",placeholder:t.$t("common.discount_placeholder")},domProps:{value:t.form.discount},on:{change:t.calculateSum,keyup:t.calculateSum,input:function(e){e.target.composing||t.$set(t.form,"discount",e.target.value)}}}),t._v(" "),1==t.form.discountType?e("div",{staticClass:"input-group-append"},[e("span",{staticClass:"input-group-text"},[t._v(t._s(t._f("withCurrency")(t.form.totalDiscount)))])]):t._e()]),t._v(" "),e("has-error",{attrs:{form:t.form,field:"discount"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6 col-lg-6"},[e("label",{attrs:{for:"transportCost"}},[t._v(t._s(t.$t("common.transport_cost")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.transportCost,expression:"form.transportCost"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("transportCost")},attrs:{id:"transportCost",type:"number",step:"any",min:"1",name:"transportCost",placeholder:t.$t("common.transport_cost_placeholder")},domProps:{value:t.form.transportCost},on:{change:t.calculateSum,keyup:t.calculateSum,input:function(e){e.target.composing||t.$set(t.form,"transportCost",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"transportCost"}})],1),t._v(" "),t.taxes?e("div",{staticClass:"form-group col-md-6 col-lg-6"},[e("label",{attrs:{for:"orderTax"}},[t._v(t._s(t.$t("common.invoice_tax"))+" ")]),t._v(" "),e("div",{staticClass:"input-group select-input-group"},[e("v-select",{staticClass:"w-85",class:{"is-invalid":t.form.errors.has("orderTax")},attrs:{options:t.taxes,label:"code",name:"orderTax",placeholder:t.$t("sales.common.invoice_tax_placeholder")},on:{input:t.calculateSum},model:{value:t.form.orderTax,callback:function(e){t.$set(t.form,"orderTax",e)},expression:"form.orderTax"}}),t._v(" "),e("div",{staticClass:"input-group-prepend input-c-margin"},[e("div",{staticClass:"input-group-text"},[t.form.orderTax?e("span",[t._v(t._s(t._f("withCurrency")(t.form.totalTax)))]):e("span",[t._v(t._s(t._f("withCurrency")(0)))])])])],1)]):t._e()]),t._v(" "),e("div",{staticClass:"pos-net-total noi-print"},[t._v("\n "+t._s(t.$t("common.net_total"))+": "+t._s(t._f("withCurrency")(t.form.netTotal))+"\n ")])])]),t._v(" "),e("div",{staticClass:"row no-print"},[e("div",{staticClass:"col-12 col-lg-5 mb-1"},[e("button",{staticClass:"btn btn-primary btn-block",on:{click:t.saveInvoice,keydown:function(e){return t.form.onKeydown(e)}}},[e("i",{staticClass:"fas fa-save"}),t._v(" "+t._s(t.$t("pos.complete_order"))+"\n ")])]),t._v(" "),e("div",{staticClass:"col-12 col-lg-5 mb-1"},[e("button",{staticClass:"btn btn-primary btn-block",on:{click:t.completeOrderAndAddPayment}},[e("i",{staticClass:"fas fa-credit-card"}),t._v("\n "+t._s(t.$t("pos.complete_order_and_add_payment"))+"\n ")])]),t._v(" "),e("div",{staticClass:"col-12 col-lg-2"},[e("button",{staticClass:"btn btn-secondary float-right btn-block",attrs:{type:"reset"},on:{click:function(e){return t.form.reset()}}},[e("i",{staticClass:"fas fa-power-off"}),t._v(" "+t._s(t.$t("common.reset"))+"\n ")])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-7"},[e("div",{staticClass:"card bg-transparent"},[e("div",{staticClass:"pos-r-head bg-white"},[e("div",{staticClass:"row"},[t.categories?e("div",{staticClass:"form-group col-md-6"},[e("v-select",{class:{"is-invalid":t.form.errors.has("category")},attrs:{options:t.categories,label:"name",name:"category",placeholder:t.$t("common.category_name_placeholder")},on:{input:t.getSubCategoriesByCategory},model:{value:t.form.category,callback:function(e){t.$set(t.form,"category",e)},expression:"form.category"}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"category"}})],1):t._e(),t._v(" "),t.subCategories?e("div",{staticClass:"form-group col-md-6"},[e("v-select",{class:{"is-invalid":t.form.errors.has("subCategory")},attrs:{options:t.subCategories,label:"name",name:"subCategory",placeholder:t.$t("common.category_name_placeholder")},on:{input:t.getProductsBySubCategory},model:{value:t.form.subCategory,callback:function(e){t.$set(t.form,"subCategory",e)},expression:"form.subCategory"}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"subCategory"}})],1):t._e(),t._v(" "),t.products?e("div",{staticClass:"col-md-12 form-group"},[e("div",{staticClass:"d-flex w-100"},[e("search",{staticClass:"flex-grow-1",attrs:{isPosSearch:!0},on:{"reset-pagination":function(e){return t.resetPagination()},reload:t.reload},model:{value:t.query,callback:function(e){t.query=e},expression:"query"}}),t._v(" "),e("ProductCreateModal",{on:{reloadProducts:t.getProducts}},[e("div",{staticClass:"input-group-text create-btn-2"},[e("i",{staticClass:"fas fa-solid fa-plus-circle"})])])],1),t._v(" "),e("has-error",{attrs:{form:t.form,field:"selectedProducts"}})],1):t._e()])]),t._v(" "),e("div",{staticClass:"card-body bg-white mt-3 pos-body"},[e("div",{staticClass:"pos-item-grid"},t._l(t.products,(function(r){return e("div",{key:r.id,class:Number(r.inventoryCount)<1?"pos-item-grid-red":"",on:{click:function(e){return t.storeProduct(r)}}},[e("div",{staticClass:"pos-box"},[e("div",{staticClass:"relative"},[e("div",{staticClass:"pos-box-img"},[r.image?e("div",[e("img",{staticClass:"pos-box-icon",attrs:{src:r.image,alt:"product image"}})]):e("div",[t._v(t._s(t.$t("common.no_preview")))])]),t._v(" "),e("span",{staticClass:"box-qty",class:Number(r.inventoryCount)<1?"qty-red":""},[t._v(t._s(r.inventoryCount))])]),t._v(" "),e("div",{staticClass:"pos-box-content"},[e("span",[t._v(t._s(t._f("withPrefix")(r.code,t.productPrefix)))]),t._v(" "),e("p",{staticClass:"pos-box-text"},[t._v(t._s(r.name))])])])])})),0),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 d-flex justify-content-center"},[t.pagination&&t.pagination.last_page>1?e("pagination",{staticClass:"justify-flex-end mt-3",attrs:{pagination:t.pagination,offset:5},on:{paginate:t.paginate}}):t._e()],1)])])])])]),t._v(" "),t.showModal?e("Modal",{staticClass:"pay-modal",attrs:{form:t.form}},[e("h5",{attrs:{slot:"header"},slot:"header"},[t._v(t._s(t.$t("pos.add_payment")))]),t._v(" "),e("div",{staticClass:"w-100",attrs:{slot:"body"},slot:"body"},[e("div",[t.accounts&&t.form.selectedProducts&&t.form.selectedProducts.length>0?e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-8"},[e("label",{attrs:{for:"account"}},[t._v(t._s(t.$t("common.account"))+"\n "),e("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),e("v-select",{class:{"is-invalid":t.form.errors.has("account")},attrs:{options:t.accounts,label:"label",name:"account",placeholder:t.$t("common.account_placeholder")},model:{value:t.form.account,callback:function(e){t.$set(t.form,"account",e)},expression:"form.account"}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"account"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-4"},[e("label",{attrs:{for:"paidAmount"}},[t._v(t._s(t.$t("common.amount"))),e("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.paidAmount,expression:"form.paidAmount"}],ref:"paidAmountInput",staticClass:"form-control",class:{"is-invalid":t.form.errors.has("paidAmount")},attrs:{id:"paidAmount",type:"number",step:"any",name:"paidAmount",min:"1",max:t.form.netTotal,placeholder:t.$t("common.paid_amount_placeholder")},domProps:{value:t.form.paidAmount},on:{input:function(e){e.target.composing||t.$set(t.form,"paidAmount",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"paidAmount"}})],1)]):t._e(),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"chequeNo"}},[t._v(t._s(t.$t("common.cheque_no")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.chequeNo,expression:"form.chequeNo"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("chequeNo")},attrs:{id:"chequeNo",type:"text",step:"any",name:"chequeNo",placeholder:t.$t("common.cheque_placeholder")},domProps:{value:t.form.chequeNo},on:{input:function(e){e.target.composing||t.$set(t.form,"chequeNo",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"chequeNo"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"receiptNo"}},[t._v(t._s(t.$t("common.receipt_no")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.receiptNo,expression:"form.receiptNo"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("receiptNo")},attrs:{id:"receiptNo",type:"text",name:"receiptNo",placeholder:t.$t("common.receipt_no_placeholder")},domProps:{value:t.form.receiptNo},on:{input:function(e){e.target.composing||t.$set(t.form,"receiptNo",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"receiptNo"}})],1)]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"poReference"}},[t._v(t._s(t.$t("common.po_reference")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.poReference,expression:"form.poReference"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("poReference")},attrs:{id:"poReference",type:"text",step:"any",name:"poReference",placeholder:t.$t("common.po_reference_placeholder")},domProps:{value:t.form.poReference},on:{input:function(e){e.target.composing||t.$set(t.form,"poReference",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"poReference"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"paymentTerms"}},[t._v(t._s(t.$t("common.payment_terms")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.paymentTerms,expression:"form.paymentTerms"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("paymentTerms")},attrs:{id:"paymentTerms",type:"text",name:"paymentTerms",placeholder:t.$t("common.payment_terms_placeholder")},domProps:{value:t.form.paymentTerms},on:{input:function(e){e.target.composing||t.$set(t.form,"paymentTerms",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"paymentTerms"}})],1)]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"reference"}},[t._v(t._s(t.$t("common.reference")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.reference,expression:"form.reference"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("reference")},attrs:{id:"reference",type:"text",name:"reference",placeholder:t.$t("common.reference_placeholder")},domProps:{value:t.form.reference},on:{input:function(e){e.target.composing||t.$set(t.form,"reference",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"reference"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"deliveryPlace"}},[t._v(t._s(t.$t("sales.common.delivery_place")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.deliveryPlace,expression:"form.deliveryPlace"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("deliveryPlace")},attrs:{id:"deliveryPlace",type:"text",name:"deliveryPlace",placeholder:t.$t("sales.common.delivery_place_placeholder")},domProps:{value:t.form.deliveryPlace},on:{input:function(e){e.target.composing||t.$set(t.form,"deliveryPlace",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"deliveryPlace"}})],1)]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"date"}},[t._v(t._s(t.$t("common.date")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.date,expression:"form.date"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("date")},attrs:{id:"date",type:"date",name:"date"},domProps:{value:t.form.date},on:{input:function(e){e.target.composing||t.$set(t.form,"date",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"date"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"status"}},[t._v(t._s(t.$t("common.status")))]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.status,expression:"form.status"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("status")},attrs:{id:"status"},on:{change:function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"status",e.target.multiple?r:r[0])}}},[e("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("common.active")))]),t._v(" "),e("option",{attrs:{value:"0"}},[t._v(t._s(t.$t("common.in_active")))])]),t._v(" "),e("has-error",{attrs:{form:t.form,field:"status"}})],1)]),t._v(" "),e("div",{staticClass:"form-group"},[e("label",{attrs:{for:"note"}},[t._v(t._s(t.$t("common.note")))]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.note,expression:"form.note"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("note")},attrs:{id:"note",placeholder:t.$t("common.note_placeholder")},domProps:{value:t.form.note},on:{input:function(e){e.target.composing||t.$set(t.form,"note",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"note"}})],1)])]),t._v(" "),e("div",{staticClass:"payment-modal-footer",attrs:{slot:"modal-footer"},slot:"modal-footer"},[e("div",{staticClass:"pos-modal-footer no-print"},[e("button",{staticClass:"btn btn-primary",on:{click:t.addPayment,keydown:function(e){return t.form.onKeydown(e)}}},[e("i",{staticClass:"fas fa-save"}),t._v(" "+t._s(t.$t("common.save"))+"\n ")]),t._v(" "),e("button",{staticClass:"modal-default-button btn btn-danger",on:{click:t.closeModalAndClearFormData}},[t._v("\n "+t._s(t.$t("common.close"))+"\n ")])])])]):t._e(),t._v(" "),t.showSmallInvoiceModal?e("Modal",{attrs:{allData:t.allData}},[e("h5",{staticClass:"no-print",attrs:{slot:"header"},slot:"header"},[t._v(t._s(t.$t("pos.invoice_receipt")))]),t._v(" "),e("div",{staticClass:"w-100",attrs:{slot:"body"},slot:"body"},[e("div",{attrs:{id:"invoice-POS"}},[e("div",{staticStyle:{"max-width":"400px",margin:"0px auto"}},[e("div",{staticClass:"info"},[t.appInfo.blackLogo?e("div",{staticClass:"pos-logo"},[e("img",{attrs:{src:t.appInfo.blackLogo,width:"100px"}})]):e("h2",{staticClass:"text-center"},[t._v(t._s(t.appInfo.companyName))]),t._v(" "),e("p",[e("span",[t._v(t._s(t.$t("common.date"))+" : "+t._s(t.allData.invoiceDate)+" "),e("br")]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.appInfo.address,expression:"appInfo.address"}]},[t._v(t._s(t.$t("common.address"))+" : "+t._s(t.appInfo.address)+" "),e("br")]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.appInfo.email,expression:"appInfo.email"}]},[t._v(t._s(t.$t("common.email"))+" : "+t._s(t.appInfo.email)+" "),e("br")]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.appInfo.phone,expression:"appInfo.phone"}]},[t._v(t._s(t.$t("common.phone"))+" : "+t._s(t.appInfo.phone)+" "),e("br")]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.allData.client.name,expression:"allData.client.name"}]},[t._v(t._s(t.$t("common.client"))+" : "+t._s(t.allData.client.name)+" "),e("br")]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.allData.createdBy,expression:"allData.createdBy"}]},[t._v(t._s(t.$t("common.sold_by"))+" : "+t._s(t.allData.createdBy)+" "),e("br")])])]),t._v(" "),e("table",{staticClass:"table_data"},[e("tbody",[t._l(t.invoiceProducts,(function(r,o){return e("tr",{key:o},[e("td",{attrs:{colspan:"3"}},[e("span",[t._v("\n "+t._s(r.productName)),e("br"),t._v(" "),e("span",{staticClass:"pqty"},[t._v(t._s(r.quantity)+" "+t._s(r.productUnit)+" x\n "+t._s(t._f("withCurrency")(r.unitCost)))])])]),t._v(" "),e("td",{staticStyle:{"text-align":"right","vertical-align":"bottom"}},[t._v("\n "+t._s(t._f("withCurrency")(r.unitCost*r.quantity))+"\n ")])])})),t._v(" "),e("tr",{staticStyle:{"margin-top":"10px"}},[e("td",{staticClass:"total",attrs:{colspan:"3"}},[t._v(t._s(t.$t("common.subtotal")))]),t._v(" "),e("td",{staticClass:"total",staticStyle:{"text-align":"right"}},[t._v("\n "+t._s(t._f("withCurrency")(t.allData.subTotal))+"\n ")])]),t._v(" "),t.allData.discount?e("tr",{staticStyle:{"margin-top":"10px"}},[e("td",{staticClass:"total",attrs:{colspan:"3"}},[t._v(t._s(t.$t("common.discount")))]),t._v(" "),e("td",{staticClass:"total",staticStyle:{"text-align":"right"}},[t._v("\n "+t._s(t._f("withCurrency")(t.allData.discount))+"\n ")])]):t._e(),t._v(" "),t.allData.tax?e("tr",{staticStyle:{"margin-top":"10px"}},[e("td",{staticClass:"total",attrs:{colspan:"3"}},[t._v(t._s(t.$t("common.tax"))+"(%)")]),t._v(" "),e("td",{staticClass:"total",staticStyle:{"text-align":"right"}},[t._v("\n "+t._s(t._f("withCurrency")(t.allData.tax))+"\n ")])]):t._e(),t._v(" "),e("tr",{staticStyle:{"margin-top":"10px"}},[e("td",{staticClass:"total",attrs:{colspan:"3"}},[t._v(t._s(t.$t("common.total")))]),t._v(" "),e("td",{staticClass:"total",staticStyle:{"text-align":"right"}},[t._v("\n "+t._s(t._f("withCurrency")(t.allData.subTotal-t.allData.totalInvoiceReturn-t.allData.discount+t.allData.transport+t.allData.tax))+"\n ")])]),t._v(" "),e("tr",[e("td",{staticClass:"total",attrs:{colspan:"3"}},[t._v(t._s(t.$t("common.paid")))]),t._v(" "),e("td",{staticClass:"total",staticStyle:{"text-align":"right"}},[t._v("\n "+t._s(t._f("withCurrency")(t.allData.totalPaid))+"\n ")])]),t._v(" "),e("tr",[e("td",{staticClass:"total",attrs:{colspan:"3"}},[t._v(t._s(t.$t("common.due")))]),t._v(" "),e("td",{staticClass:"total",staticStyle:{"text-align":"right"}},[t._v("\n "+t._s(t._f("withCurrency")(t.allData.due))+"\n ")])])],2)]),t._v(" "),e("div",{staticClass:"ml-2 mb-4",attrs:{id:"legalcopy"}},[e("p",{staticClass:"legal"},[e("strong",[t._v(t._s(t.$t("pos.receipt_text")))])]),t._v(" "),e("div",{attrs:{id:"bar"}},[e("barcode",{attrs:{width:"2",height:"25",fontSize:"15",value:t._f("withPrefix")(t.allData.invoiceNo,t.invoicePrefix)}},[t._v("\n "+t._s(t.$t("common.rendering_fails"))+"\n ")])],1)])])])]),t._v(" "),e("div",{staticClass:"pos-modal-footer no-print",attrs:{slot:"modal-footer"},slot:"modal-footer"},[e("div",[e("button",{staticClass:"modal-default-button btn btn-info",on:{click:function(e){return t.printInvoice()}}},[t._v("\n "+t._s(t.$t("common.print"))+"\n ")])]),t._v(" "),e("button",{staticClass:"modal-default-button btn btn-danger",on:{click:t.closeReceiptModal}},[t._v("\n "+t._s(t.$t("common.close"))+"\n ")])])]):t._e()],1)}),[],!1,null,"735cacc8",null);e.default=b.exports},586:function(t,e,r){var o=r(739);"string"==typeof o&&(o=[[t.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(o,a);o.locals&&(t.exports=o.locals)},621:function(t,e,r){t.exports=r.p+"21527b8a2bd935b6a7a83edec0c5ba4b.wav"},738:function(t,e,r){"use strict";r(586)},739:function(t,e,r){(t.exports=r(31)(!1)).push([t.i,".pos-r-head[data-v-735cacc8]{box-shadow:0 0 3px rgba(0,0,0,.2);padding:20px;box-sizing:border-box;border-radius:5px;border-bottom:1px solid #f3f3f3}.pos-logo[data-v-735cacc8]{text-align:center}.pos-item-grid[data-v-735cacc8]{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;grid-gap:10px}.pos-item-grid>div[data-v-735cacc8]{border-radius:10px;box-shadow:0 4px 20px 1px rgba(0,0,0,.06),0 1px 4px rgba(0,0,0,.08);overflow:hidden;cursor:pointer;border:1px solid #fff;position:relative}.pos-item-grid>div[data-v-735cacc8]:hover{border-color:#6366f1}.pos-item-grid>div .box-qty[data-v-735cacc8]{position:absolute;width:50px;height:30px;display:block;background:#6366f1;top:0;left:0;text-align:center;line-height:30px;font-size:12px;font-weight:700;color:#fff;border-bottom-right-radius:10px}.qty-red[data-v-735cacc8]{background:red!important}.pos-body[data-v-735cacc8]{border-radius:5px;min-height:240px}.pos-box-img[data-v-735cacc8]{width:100%;height:100px;border-bottom:1px solid #f1f1f1;background:#ebebeb;line-height:100px;text-align:center;font-size:13px;font-weight:700}.pos-box-img img[data-v-735cacc8]{width:100%;height:100px;-o-object-fit:cover;object-fit:cover}.pos-box-content p[data-v-735cacc8]{font-size:14px;font-weight:700;margin-bottom:0}.pos-box-content span[data-v-735cacc8]{font-size:12px;margin-bottom:2px}.pos-box-content[data-v-735cacc8]{padding:5px 10px}.pos-item-grid-red[data-v-735cacc8]{border-color:red!important}.card-client-search[data-v-735cacc8]{padding:20px;border-bottom:1px solid #ddd}.table-wrap[data-v-735cacc8]{padding:15px}.table-responsive.table-wrap>table[data-v-735cacc8]{border:1px solid #ddd}.table-wrap .table thead tr[data-v-735cacc8]{border-bottom:0;background:rgba(99,102,241,.1215686275)!important}.table-wrap .incrementor[data-v-735cacc8]{width:80px}.table-wrap .custom-qty-input[data-v-735cacc8]{display:inline-flex!important;justify-content:center;border:1px solid rgba(236,236,253,.7215686275);padding:0;border-radius:18px}.table-wrap .btn-danger[data-v-735cacc8]{width:25px;height:25px;font-size:10px;padding:0}.table-wrap .icon-sm[data-v-735cacc8]{width:25px;height:25px;line-height:23px}.pos-card-footer[data-v-735cacc8]{border:1px solid #ddd;background:#fff;border-radius:4px;margin-bottom:15px}.pos-net-total[data-v-735cacc8]{background:rgba(99,102,241,.2);width:100%;padding:10px;text-align:center;font-size:22px;font-weight:700}.product[data-v-735cacc8]{cursor:pointer}.product .info-box[data-v-735cacc8]:hover{background:#e0e0e0}.dark-mode .pos-body[data-v-735cacc8],.dark-mode .pos-r-head[data-v-735cacc8]{background:#111827!important;border-color:#000}.dark-mode .pos-item-grid>div[data-v-735cacc8]{border-color:#6c757d!important}.dark-mode .pos-box-content[data-v-735cacc8]{padding:5px 10px;color:#fff}.dark-mode .pos-item-grid>div.pos-item-grid-red[data-v-735cacc8]{border-color:red!important}.dark-mode .card-client-search[data-v-735cacc8]{border-color:#6c757d}.dark-mode .table-striped tbody tr[data-v-735cacc8]:nth-of-type(odd){background-color:#1f2937}.dark-mode .table-responsive.table-wrap>table[data-v-735cacc8]{border:1px solid #6c757d}.dark-mode .table-wrap .incrementor[data-v-735cacc8]{border:none!important}.dark-mode .pos-card-footer.bg-white[data-v-735cacc8]{background:#111827!important;border-color:#6c757d}.dark-mode .pos-card-footer label[data-v-735cacc8]{color:#fff}.dark-mode .pos-net-total[data-v-735cacc8]{background:#63a9f1;color:#fff}#invoice-POS table[data-v-735cacc8],#invoice-POS td[data-v-735cacc8],#invoice-POS th[data-v-735cacc8],#invoice-POS tr[data-v-735cacc8]{border-collapse:collapse}#invoice-POS tr[data-v-735cacc8]{border-bottom:2px dotted #05070b}#invoice-POS table[data-v-735cacc8]{width:100%}#invoice-POS tfoot tr th[data-v-735cacc8]:first-child{text-align:left}#invoice-POS .info[data-v-735cacc8]{margin-bottom:20px}#invoice-POS .info>p[data-v-735cacc8]{margin-top:20px}#legalcopy[data-v-735cacc8]{margin-top:5mm}#bar[data-v-735cacc8],#legalcopy p[data-v-735cacc8]{text-align:center}.total[data-v-735cacc8]{font-weight:700;font-size:12px}span.pqty[data-v-735cacc8]{display:block;line-height:15px;font-size:12px;font-weight:500;margin-bottom:5px}@media only screen and (max-width:1250px){.pos-item-grid[data-v-735cacc8]{grid-template-columns:1fr 1fr 1fr 1fr}}@media only screen and (max-width:991px){.pos-item-grid[data-v-735cacc8]{grid-template-columns:1fr 1fr 1fr}}@media only screen and (max-width:767px){.sm-col-reverse[data-v-735cacc8]{flex-direction:column-reverse}.pos-item-grid[data-v-735cacc8]{grid-template-columns:1fr 1fr 1fr 1fr}}.create-btn[data-v-735cacc8]{padding:11px}.create-btn-2[data-v-735cacc8]{padding:10px}",""])}}]);
Simpan