⚝
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
/
makarnacimmix.xyz
/
public
/
dist
/
js
/
View File Name :
146.cc3376.js
/*! For license information please see 146.cc3376.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[146],{531:function(t,e,r){"use strict";r.r(e);var o=r(5),n=r(3),a=r.n(n),i=r(4);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 c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function m(t,e,r,n){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),s=new N(n||[]);return o(i,"_invoke",{value:T(t,r,s)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=m;var v={};function d(){}function p(){}function h(){}var _={};l(_,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(D([])));g&&g!==e&&r.call(g,a)&&(_=g);var b=h.prototype=d.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var n;o(this,"_invoke",{value:function(o,a){function i(){return new e((function(n,i){!function o(n,a,i,c){var u=f(t[n],t,a);if("throw"!==u.type){var l=u.arg,m=l.value;return m&&"object"==s(m)&&r.call(m,"__await")?e.resolve(m.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(m).then((function(t){l.value=t,i(l)}),(function(t){return o("throw",t,i,c)}))}c(u.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}})}function T(t,e,r){var o="suspendedStart";return function(n,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw a;return O()}for(r.method=n,r.arg=a;;){var i=r.delegate;if(i){var s=C(i,r);if(s){if(s===v)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=f(t,e,r);if("normal"===c.type){if(o=r.done?"completed":"suspendedYield",c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o="completed",r.method="throw",r.arg=c.arg)}}}function C(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,C(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var n=f(o,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,v;var a=n.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,v):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}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 N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function D(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 o=-1,n=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 n.next=n}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=h,o(b,"constructor",{value:h,configurable:!0}),o(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,o,n,a){void 0===a&&(a=Promise);var i=new x(m(e,r,o,n),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"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=D,N.prototype={constructor:N,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)&&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 n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;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,v):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),v},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),$(r),v}},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 n=o.arg;$(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:D(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},t}function u(t,e,r,o,n,a,i){try{var s=t[a](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(o,n)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(o,n){var a=t.apply(e,r);function i(t){u(a,o,n,i,s,"next",t)}function s(t){u(a,o,n,i,s,"throw",t)}i(void 0)}))}}function m(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 f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v={middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("sales.returns.create.page_title")}},data:function(){return{breadcrumbsCurrent:"sales.returns.create.breadcrumbs_current",breadcrumbs:[{name:"sales.returns.create.breadcrumbs_first",url:"home"},{name:"sales.returns.create.breadcrumbs_second",url:"invoiceReturns.index"},{name:"sales.returns.create.breadcrumbs_active",url:""}],form:new o.a({returnReason:"",account:"",availableBalance:0,chequeNo:"",receiptNo:"",client:"",invoice:"",product:"",selectedProducts:[],totalReturn:0,date:(new Date).toISOString().slice(0,10),note:"",status:1,invoiceTax:0,newTax:0,invoiceDiscount:0,discountType:0,discountPercentage:0,invoiceTransport:0,invoiceTaxRate:0,invoiceTotal:0,invoiceDue:0,totalPaid:0,newDue:0,newDueText:"",returnAmount:0,returnAmountText:0,newSubTotal:0}),products:"",accounts:"",clientInvoices:"",prefix:""}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(i.b)("operations",["items","appInfo"])),created:function(){this.getClients(),this.getProducts(),this.getAccounts(),this.prefix=this.appInfo.productPrefix},methods:{getClients:function(){var t=this;return l(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("operations/allData",{path:"/api/all-clients"});case 2:case"end":return e.stop()}}),e)})))()},getProducts:function(){var t=this;return l(c().mark((function e(){var r,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.get(window.location.origin+"/api/all-products");case 2:r=e.sent,o=r.data,t.products=o.data;case 5:case"end":return e.stop()}}),e)})))()},getAccounts:function(){var t=this;return l(c().mark((function e(){var r,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.get(window.location.origin+"/api/all-accounts");case 2:r=e.sent,o=r.data,t.accounts=o.data;case 5:case"end":return e.stop()}}),e)})))()},updateBalance:function(){this.form.availableBalance=0,this.form.account&&(this.form.availableBalance=this.form.account.availableBalance)},assignInvoices:function(){var t=this;return l(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.form.selectedProducts=[],t.form.invoice="",t.form.client?a.a.post(window.location.origin+"/api/client/filter-invoices",{products:t.form.product,clientSlug:t.form.client.slug}).then((function(e){t.clientInvoices=e.data.data})):(t.form.product="",t.form.client="");case 3:case"end":return e.stop()}}),e)})))()},storeProducts:function(){for(var t in this.form.selectedProducts=[],this.form.invoiceTax=this.form.invoice.tax,this.form.newTax=this.form.invoice.tax,this.form.invoiceTaxRate=this.form.invoice.taxRate,this.form.invoiceTotal=this.form.invoice.invoiceTotal,this.form.invoiceTransport=this.form.invoice.transport,this.form.invoiceDiscount=this.form.invoice.discount,this.form.discountType=this.form.invoice.discountType,this.form.discountPercentage=this.form.invoice.discountPercentage,this.form.invoiceDue=this.form.invoice.due,this.form.newDue=this.form.invoice.due,this.form.newDueText=this.form.invoice.due,this.form.invoice.invoiceProducts){var e=this.form.invoice.invoiceProducts[t];this.form.selectedProducts.unshift({id:e.productID,slug:e.productSlug,name:e.productName,code:e.productCode,unit:e.productUnit,taxType:e.taxType,taxRate:e.taxRate,oldQty:e.quantity,qty:e.quantity,returnQty:e.returnQty,totalReturnQty:e.quantity-e.returnQty,inventoryCount:e.inventoryCount,avgPurchasePrice:e.purchasePrice,unitPrice:e.salePrice,unitCost:e.unitCost,totalPrice:e.unitCostTotal,returnTotal:0,productTax:e.unitTax,totalTax:e.taxTotal,maxQty:e.quantity-1})}},updateItem:function(t,e){var r=this.form.selectedProducts[e];r&&t>=0&&t<r.qty&&(r.returnQty=Number(t),r.returnTotal=r.returnQty*r.unitCost,this.form.selectedProducts[e]=r),this.calculateSum()},calculateSum:function(){var t=this.form.selectedProducts.length;this.form.newSubTotal=this.form.totalReturn=0;for(var e=0;e<t;e++){var r=this.form.selectedProducts[e];this.form.newSubTotal+=Number(((r.qty-r.returnQty)*r.unitCost).toFixed(2)),this.form.totalReturn+=Number(r.returnTotal.toFixed(2))}1==this.form.discountType&&(this.form.invoiceDiscount=Number(this.form.discountPercentage/100*this.form.newSubTotal).toFixed(2)),this.form.newTax=Number((this.form.invoiceTaxRate.rate/100*this.form.newSubTotal).toFixed(2)),this.form.invoiceTotal=Number((this.form.newSubTotal+this.form.newTax+this.form.invoiceTransport-this.form.invoiceDiscount).toFixed(2)),this.form.invoiceDue=Number((this.form.invoiceTotal-this.form.invoice.totalPaid).toFixed(2)),this.form.invoiceDue>=0?(this.form.newDue=this.form.invoiceTotal-this.form.invoice.totalPaid,this.form.newDueText=this.form.invoiceTotal+" - "+this.form.invoice.totalPaid+" = "+Number(this.form.newDue).toFixed(2),this.form.returnAmount=0):(this.form.returnAmount=Number((this.form.invoice.totalPaid-this.form.invoiceTotal).toFixed(2)),this.form.returnAmountText=this.form.invoice.totalPaid+" - "+this.form.invoiceTotal+" = "+this.form.returnAmount,this.form.invoiceDue=0,this.form.newDue=0)},saveInvoiceReturn:function(){var t=this;return l(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.form.post(window.location.origin+"/api/invoice-returns").then((function(e){var r=e.data;toast.fire({type:"success",title:t.$t("sales.returns.create.success_msg")}),t.$router.push({name:"invoiceReturns.show",params:{slug:r.data.slug}})})).catch((function(){toast.fire({type:"error",title:t.$t("common.error_msg")})}));case 2:case"end":return e.stop()}}),e)})))()}}},d=r(1),p=Object(d.a)(v,(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"},[e("div",{staticClass:"col-lg-12 col-xl-12"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v("\n "+t._s(t.$t("sales.returns.create.form_title"))+"\n ")]),t._v(" "),e("router-link",{staticClass:"btn btn-dark float-right",attrs:{to:{name:"invoiceReturns.index"}}},[e("i",{staticClass:"fas fa-long-arrow-alt-left"}),t._v(" "+t._s(t.$t("common.back"))+"\n ")])],1),t._v(" "),e("form",{attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.saveInvoiceReturn.apply(null,arguments)},keydown:function(e){return t.form.onKeydown(e)}}},[e("div",{staticClass:"card-body"},[t.items?e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"returnReason"}},[t._v(t._s(t.$t("common.return_reason"))+"\n "),e("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.returnReason,expression:"form.returnReason"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("returnReason")},attrs:{id:"returnReason",type:"text",name:"returnReason",placeholder:t.$t("common.return_reason_placeholder")},domProps:{value:t.form.returnReason},on:{input:function(e){e.target.composing||t.$set(t.form,"returnReason",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"returnReason"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"client"}},[t._v(t._s(t.$t("common.client"))+"\n "),e("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),e("v-select",{class:{"is-invalid":t.form.errors.has("client")},attrs:{options:t.items,label:"name",name:"client",placeholder:t.$t("common.client_placeholder")},on:{input:t.assignInvoices},model:{value:t.form.client,callback:function(e){t.$set(t.form,"client",e)},expression:"form.client"}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"client"}})],1)]):t._e(),t._v(" "),t.products?e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-12"},[e("label",{attrs:{for:"product"}},[t._v(t._s(t.$t("common.select_products")))]),t._v(" "),e("v-select",{class:{"is-invalid":t.form.errors.has("product")},attrs:{disabled:""==t.form.client,multiple:"",options:t.products,label:"label",name:"product",placeholder:t.$t("common.select_products_placeholder")},on:{input:t.assignInvoices},model:{value:t.form.product,callback:function(e){t.$set(t.form,"product",e)},expression:"form.product"}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"product"}})],1)]):t._e(),t._v(" "),t.form.client&&t.clientInvoices?e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-12"},[e("label",{attrs:{for:"invoice"}},[t._v(t._s(t.$t("common.invoices"))+"\n "),e("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),e("v-select",{class:{"is-invalid":t.form.errors.has("invoice")},attrs:{options:t.clientInvoices,label:"label",name:"invoice",placeholder:t.$t("common.invoices_placeholder")},on:{input:t.storeProducts},model:{value:t.form.invoice,callback:function(e){t.$set(t.form,"invoice",e)},expression:"form.invoice"}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"invoice"}})],1)]):t._e(),t._v(" "),t.form.selectedProducts&&t.form.selectedProducts.length>0?e("div",{staticClass:"row mt-3 mb-4"},[t.form.errors.errors&&t.form.errors.errors.selectedProducts?e("div",{staticClass:"w-95 m-auto"},t._l(t.form.errors.errors.selectedProducts,(function(r,o){return e("div",{key:o,staticClass:"callout callout-danger"},[e("p",[e("i",{staticClass:"icon fas fa-ban"}),t._v(" "+t._s(r))])])})),0):t._e(),t._v(" "),e("div",{staticClass:"table-responsive table-custom w-95 m-auto"},[e("table",{staticClass:"table table-hover table-sm text-center"},[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.invoice_qty")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.current_qty")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.return_qty")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.unit_price")))]),t._v(" "),e("th",[t._v(t._s(t.$t("common.total_price")))]),t._v(" "),e("th",{staticClass:"text-right"},[t._v("\n "+t._s(t.$t("common.return_price"))+"\n ")])])]),t._v(" "),e("tbody",[t._l(t.form.selectedProducts,(function(r,o){return e("tr",{key:o},[e("td",[t._v(t._s(++o))]),t._v(" "),e("td",[t._v(t._s(t._f("withPrefix")(r.code,t.prefix)))]),t._v(" "),e("td",[t.$can("product-view")?e("router-link",{attrs:{to:{name:"products.show",params:{slug:r.slug}}}},[t._v("\n "+t._s(r.name)+"\n ")]):e("span",[t._v(t._s(r.name))])],1),t._v(" "),e("td",[t._v(t._s(r.qty)+" "+t._s(r.unit))]),t._v(" "),e("td",[t._v(t._s(r.totalReturnQty)+" "+t._s(r.unit))]),t._v(" "),e("td",[e("div",{staticClass:"input-group 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.updateItem(r.returnQty-1,o-1)}}}),t._v(" "),e("input",{staticClass:"quantity-field border-0 incrementor",attrs:{type:"number",step:"any",id:"returnQty-".concat(o),name:"quantity",min:"0",max:r.maxQty,placeholder:"Return Qty"},domProps:{value:r.returnQty},on:{change:function(e){return t.updateItem(e.target.value,o-1)},keyup:function(e){return t.updateItem(e.target.value,o-1)}}}),t._v(" "),e("input",{staticClass:"button-plus icon-shape icon-sm btn-primary",attrs:{type:"button",value:"+","data-field":"quantity"},on:{click:function(e){t.updateItem(Number(r.returnQty)+1,o-1)}}})])]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(r.unitCost)))]),t._v(" "),e("td",[t._v(t._s(t._f("withCurrency")(r.totalPrice)))]),t._v(" "),e("td",{staticClass:"text-right"},[t._v("\n "+t._s(t._f("withCurrency")(r.returnTotal))+"\n ")])])})),t._v(" "),t.form.invoice?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-center"},[e("strong",[t._v(t._s(t._f("withCurrency")(t.form.invoice.subTotal)))])]),t._v(" "),e("td",{staticClass:"text-right"},[e("strong",[t._v(t._s(t._f("withCurrency")(t.form.totalReturn)))])])]):t._e()],2)])])]):t._e(),t._v(" "),t.form.invoice?e("div",{staticClass:"row"},[t.form.discountPercentage>0?e("div",{staticClass:"form-group col-md-2"},[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",disabled:""},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])}}},[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._e(),t._v(" "),e("div",{staticClass:"form-group",class:t.form.discountPercentage>0?"col-md-2":"col-md-4"},[e("label",{attrs:{for:"invoiceDiscount"}},[t._v(t._s(t.$t("common.total_discount")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.invoiceDiscount,expression:"form.invoiceDiscount"}],staticClass:"form-control",attrs:{id:"invoiceDiscount",type:"number",step:"any",name:"invoiceDiscount",readonly:""},domProps:{value:t.form.invoiceDiscount},on:{input:function(e){e.target.composing||t.$set(t.form,"invoiceDiscount",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-group col-md-4"},[e("label",{attrs:{for:"invoiceTransport"}},[t._v(t._s(t.$t("common.transport_cost")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.invoiceTransport,expression:"form.invoiceTransport"}],staticClass:"form-control",attrs:{id:"invoiceTransport",type:"number",step:"any",name:"invoiceTransport",readonly:""},domProps:{value:t.form.invoiceTransport},on:{input:function(e){e.target.composing||t.$set(t.form,"invoiceTransport",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-group col-md-4"},[e("label",{attrs:{for:"invoiceTax"}},[t._v(t._s(t.$t("sales.common.invoice_tax")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.newTax,expression:"form.newTax"}],staticClass:"form-control",attrs:{id:"invoiceTax",type:"number",step:"any",name:"invoiceTax",readonly:""},domProps:{value:t.form.newTax},on:{input:function(e){e.target.composing||t.$set(t.form,"newTax",e.target.value)}}})])]):t._e(),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-4"},[e("label",{attrs:{for:"invoiceTotal"}},[t._v(t._s(t.$t("sales.common.invoice_total")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.invoiceTotal,expression:"form.invoiceTotal"}],staticClass:"form-control",attrs:{id:"invoiceTotal",type:"number",step:"any",name:"invoiceTotal",readonly:""},domProps:{value:t.form.invoiceTotal},on:{input:function(e){e.target.composing||t.$set(t.form,"invoiceTotal",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-group col-md-4"},[e("label",{attrs:{for:"totalPaid"}},[t._v(t._s(t.$t("common.total_paid")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.invoice.totalPaid,expression:"form.invoice.totalPaid"}],staticClass:"form-control",attrs:{id:"totalPaid",type:"number",step:"any",name:"totalPaid",readonly:""},domProps:{value:t.form.invoice.totalPaid},on:{input:function(e){e.target.composing||t.$set(t.form.invoice,"totalPaid",e.target.value)}}})]),t._v(" "),t.form.returnAmount>0?e("div",{staticClass:"form-group col-md-4"},[e("label",{attrs:{for:"returnAmountText"}},[t._v(t._s(t.$t("common.return_amount")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.returnAmountText,expression:"form.returnAmountText"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("returnAmountText")},attrs:{id:"returnAmountText",type:"text",name:"returnAmountText",readonly:""},domProps:{value:t.form.returnAmountText},on:{input:function(e){e.target.composing||t.$set(t.form,"returnAmountText",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"returnAmountText"}})],1):e("div",{staticClass:"form-group col-md-4"},[e("label",{attrs:{for:"newDueText"}},[t._v(t._s(t.$t("sales.common.new_due")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.newDueText,expression:"form.newDueText"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("newDueText")},attrs:{id:"newDueText",type:"text",name:"newDueText",readonly:""},domProps:{value:t.form.newDueText},on:{input:function(e){e.target.composing||t.$set(t.form,"newDueText",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"newDueText"}})],1)]),t._v(" "),t.accounts&&t.form.returnAmount>0?e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-4"},[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")},on:{input:t.updateBalance},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-2"},[e("label",{attrs:{for:"availableBalance"}},[t._v(t._s(t.$t("common.available_balance")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.availableBalance,expression:"form.availableBalance"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("availableBalance")},attrs:{id:"availableBalance",type:"number",step:"any",name:"availableBalance",readonly:""},domProps:{value:t.form.availableBalance},on:{input:function(e){e.target.composing||t.$set(t.form,"availableBalance",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"availableBalance"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-3"},[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-3"},[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._e(),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:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"date"}},[t._v(t._s(t.$t("sales.common.return_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:"card-footer"},[e("v-button",{staticClass:"btn btn-primary",attrs:{loading:t.form.busy}},[e("i",{staticClass:"fas fa-save"}),t._v(" "+t._s(t.$t("common.save"))+"\n ")]),t._v(" "),e("button",{staticClass:"btn btn-secondary float-right",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 ")])],1)])])])])],1)}),[],!1,null,null,null);e.default=p.exports}}]);