https://lidomatrip.com/_next/static/chunks/pages/admin/reservations/[id]/invoice-8d0531f89f5698cf.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6341],{20268:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/reservations/[id]/invoice",function(){return e(94478)}])},84858:function(n,t,e){"use strict";e.d(t,{LP:function(){return x},MS:function(){return p},Px:function(){return _},SC:function(){return w},YV:function(){return f},d0:function(){return j},qz:function(){return m}});var r=e(47568),i=e(51438),s=e(28668),o=e(26042),c=e(69396),l=e(25892),d=e(91224),a=e(70655),u="lidoma_admin_token",h="lidoma_admin_refresh_token";function x(){return window.localStorage.getItem(u)}function f(){return window.localStorage.getItem(h)}function j(n,t){window.localStorage.setItem(u,n),window.localStorage.setItem(h,t)}function m(){window.localStorage.removeItem(u),window.localStorage.removeItem(h)}var p=function(n){(0,s.Z)(e,n);var t=(0,d.Z)(e);function e(n,r,s,o){var c;return(0,i.Z)(this,e),(c=t.call(this,r)).status=n,c.code=s,c.details=o,c}return e}((0,l.Z)(Error)),g=null;function v(){return y.apply(this,arguments)}function y(){return(y=(0,r.Z)(function(){return(0,a.__generator)(this,function(n){return g||(g=(0,r.Z)(function(){var n,t,e,r,i,s,o;return(0,a.__generator)(this,function(c){switch(c.label){case 0:if(!(n=f()))return[2,null];c.label=1;case 1:return c.trys.push([1,4,,5]),[4,fetch("/api/auth/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:n})})];case 2:if(!(r=c.sent()).ok)return[2,null];return[4,r.json().catch(function(){return{}})];case 3:if(s=null==(i=c.sent())?void 0:null===(t=i.data)||void 0===t?void 0:t.accessToken,o=null==i?void 0:null===(e=i.data)||void 0===e?void 0:e.refreshToken,!s||!o)return[2,null];return j(s,o),[2,s];case 4:return c.sent(),[2,null];case 5:return[2]}})})().finally(function(){g=null})),[2,g]})})).apply(this,arguments)}function w(n){return b.apply(this,arguments)}function b(){return(b=(0,r.Z)(function(n){var t,e,i,s,l,d,u,h=arguments;function j(n){return g.apply(this,arguments)}function g(){return(g=(0,r.Z)(function(r){return(0,a.__generator)(this,function(i){return[2,fetch(n,(0,c.Z)((0,o.Z)({},t),{headers:(0,o.Z)({},e?{}:{"Content-Type":"application/json"},r?{Authorization:"Bearer ".concat(r)}:{},t.headers)}))]})})).apply(this,arguments)}return(0,a.__generator)(this,function(r){switch(r.label){case 0:return t=h.length>1&&void 0!==h[1]?h[1]:{},e="undefined"!=typeof FormData&&t.body instanceof FormData,[4,j(x())];case 1:if(!(401===(i=r.sent()).status&&f()&&!n.startsWith("/api/auth/")))return[3,4];return[4,v()];case 2:if(!(s=r.sent()))return[3,4];return[4,j(s)];case 3:i=r.sent(),r.label=4;case 4:return[4,i.json().catch(function(){return{}})];case 5:if(l=r.sent(),!i.ok)throw 401===i.status&&(m(),window.location.href="/admin/login"),new p(i.status,null!==(d=null==l?void 0:l.message)&&void 0!==d?d:"Ø®Ø·Ø§Û ØºÛØ±Ù
ÙØªØ¸Ø±Ù",null==l?void 0:l.code,null==l?void 0:l.details);return[2,null!==(u=l.data)&&void 0!==u?u:l]}})})).apply(this,arguments)}function _(n){return C.apply(this,arguments)}function C(){return(C=(0,r.Z)(function(n){var t,e,i,s,l,d=arguments;function u(n){return h.apply(this,arguments)}function h(){return(h=(0,r.Z)(function(e){return(0,a.__generator)(this,function(r){return[2,fetch(n,(0,c.Z)((0,o.Z)({},t),{headers:(0,o.Z)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{},t.headers)}))]})})).apply(this,arguments)}return(0,a.__generator)(this,function(n){switch(n.label){case 0:return t=d.length>1&&void 0!==d[1]?d[1]:{},[4,u(x())];case 1:if(!(401===(e=n.sent()).status&&f()))return[3,4];return[4,v()];case 2:if(!(i=n.sent()))return[3,4];return[4,u(i)];case 3:e=n.sent(),n.label=4;case 4:return[4,e.json()];case 5:if(s=n.sent(),!e.ok)throw 401===e.status&&(m(),window.location.href="/admin/login"),new p(e.status,null!==(l=null==s?void 0:s.message)&&void 0!==l?l:"خطا",null==s?void 0:s.code);return[2,{items:s.data,meta:s.meta}]}})})).apply(this,arguments)}},94478:function(n,t,e){"use strict";e.r(t),e.d(t,{default:function(){return u}});var r=e(85893),i=e(67294),s=e(11163),o=e(44389),c=e(84858),l=function(n){return(null!=n?n:0).toLocaleStr
1ing("fa-IR")},d=function(n){return n?new Intl.DateTimeFormat("fa-IR",{dateStyle:"medium"}).format(new Date(n)):"â"},a={DRAFT:"در Ø§ÙØªØ¸Ø§Ø± ثبت Ø¯Ø±Ø®ÙØ§Ø³Øª",HOST_APPROVAL:"در Ø§ÙØªØ¸Ø§Ø± تاÛÛØ¯ Ù
ÛØ²Ø¨Ø§Ù",SECOND_PAYMENT:"در Ø§ÙØªØ¸Ø§Ø± پرداخت Ù
ÙÙ
اÙ",DONE:"ÙØ·Ø¹Û",CANCEL:"ÙØºÙ شدÙ",EXPIRED:"Ù
ÙÙØ¶Û شدÙ"};function u(){var n,t,e=(0,s.useRouter)().query.id,u=(0,o.u)(e?"/api/admin/reservations/".concat(e,"/invoice"):null,function(n){return(0,c.SC)(n)}).data;if((0,i.useEffect)(function(){if(u){var n=setTimeout(function(){return window.print()},350);return function(){return clearTimeout(n)}}},[u]),!u)return(0,r.jsx)("p",{style:{padding:40,fontFamily:"inherit"},children:"در ØØ§Ù Ø¢Ù
ادÙâØ³Ø§Ø²Û ÙØ§Ú©ØªÙرâ¦"});var h=u.invoice,x=u.guestNameOverride||u.guest.name||"â",f=u.guestPhoneOverride||u.guest.phone;return(0,r.jsxs)("div",{style:{maxWidth:780,margin:"0 auto",padding:32,color:"#111",lineHeight:1.9},children:[(0,r.jsx)("style",{children:"\n @media print {\n .no-print { display: none !important; }\n @page { margin: 14mm; }\n }\n table { width: 100%; border-collapse: collapse; }\n td, th { padding: 7px 8px; border-bottom: 1px solid #e5e5e5; text-align: right; font-size: 13px; }\n th { font-weight: 600; }\n h1 { font-size: 20px; margin: 0 0 2px; }\n h2 { font-size: 14px; margin: 22px 0 6px; }\n "}),(0,r.jsx)("div",{className:"no-print",style:{marginBottom:20},children:(0,r.jsx)("button",{onClick:function(){return window.print()},style:{padding:"8px 18px",cursor:"pointer"},children:"ÚØ§Ù¾"})}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{children:"ÙØ§Ú©ØªÙر رزرÙ"}),(0,r.jsxs)("p",{style:{margin:0,fontSize:13,color:"#555"},children:["کد رزرÙ: ",u.reference," \xb7 ÙØ¶Ø¹Ûت: ",null!==(n=a[u.state])&&void 0!==n?n:u.state]})]}),(0,r.jsxs)("div",{style:{textAlign:"left",fontSize:13,color:"#555"},children:[(0,r.jsx)("div",{children:"ÙÛØ¯ÙÙ
ا ترÛÙ¾"}),(0,r.jsxs)("div",{children:["ØªØ§Ø±ÛØ® ØµØ¯ÙØ±: ",d(new Date().toISOString())]})]})]}),(0,r.jsx)("h2",{children:"Ù
شخصات Ø§ÙØ§Ù
ت"}),(0,r.jsx)("table",{children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{style:{width:160},children:"Ø§ÙØ§Ù
تگاÙ"}),(0,r.jsxs)("td",{children:[u.residence.name,u.residence.reference?" (".concat(u.residence.reference,")"):""]})]}),u.residence.address&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"ÙØ´Ø§ÙÛ"}),(0,r.jsx)("td",{children:u.residence.address})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"ØªØ§Ø±ÛØ® Ø§ÙØ§Ù
ت"}),(0,r.jsxs)("td",{children:[d(u.startDate)," تا ",d(u.endDate)," \xb7 ",l(u.daysCount)," شب"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"تعداد Ù
ÙÙ
اÙ"}),(0,r.jsxs)("td",{children:[l(u.guestsCount)," ÙÙØ±"]})]})]})}),(0,r.jsx)("h2",{children:"طرÙÛÙ"}),(0,r.jsx)("table",{children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{style:{width:160},children:"Ù
ÙÙ
اÙ"}),(0,r.jsxs)("td",{children:[x," â ",f]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Ù
ÛØ²Ø¨Ø§Ù"}),(0,r.jsxs)("td",{children:[null!==(t=u.host.name)&&void 0!==t?t:"â"," â ",u.host.phone]})]})]})}),(0,r.jsx)("h2",{children:"ØµÙØ±ØªØØ³Ø§Ø¨"}),(0,r.jsx)("table",{children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{style:{width:260},children:"Ù
Ø¨ÙØº ک٠رزرÙ"}),(0,r.jsxs)("td",{children:[l(h.totalAmount)," تÙÙ
اÙ"]})]}),h.codeDiscount>0&&(0,r.jsxs)("tr",{children:[(0,r.jsxs)("th",{children:["کد تخÙÛÙ",h.discountCode?" (".concat(h.discountCode,")"):""]}),(0,r.jsxs)("td",{style:{color:"#C62828"},children:["â",l(h.codeDiscount)," تÙÙ
اÙ"]})]}),h.hostGiftDiscount>0&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"تخÙÛÙ ÙØ¯ÛÙ Ù
ÛØ²Ø¨Ø§Ù"}),(0,r.jsxs)("td",{style:{color:"#C62828"},children:["â",l(h.hostGiftDiscount)," تÙÙ
اÙ"]})]}),h.siteGiftDiscount>0&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"تخÙÛÙ ÙØ¯ÛÙ Ø³Ø§ÛØª"}),(0,r.jsxs)("td",{style:{color:"#C62828"},children:["â",l(h.siteGiftDiscount)," تÙÙ
اÙ"]})]}),h.totalDiscount>0&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Ù
Ø¨ÙØº ÙÙØ§ÛÛ ØµÙØ±ØªØØ³Ø§Ø¨"}),(0,r.jsxs)("td",{children:[l(h.invoiceAmount)," تÙÙ
اÙ"]})]}),!!h.guestCommission&&(0,r.jsxs)("tr",{children:[(0,r.jsxs)("th",{children:["کارÙ
زد رزر٠Ù
ÙÙ
اÙ",h.guestCommissionPercent?" (".concat(l(h.guestCommissionPercent),"Ùª)"):""]}),(0,r.jsxs)("td",{children:[l(h.guestCommission)," تÙÙ
اÙ"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Ù
Ø¨ÙØº ÙÙØ§ÛÛ ÙØ§Ø¨Ù پرداخت Ù
ÙÙ
اÙ"}),(0,r.jsx)("td",{children:(0,r.jsxs)("b",{children:[l(h.guestPayable)," تÙÙ
اÙ"]})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"جÙ
ع Ù¾Ø±Ø¯Ø§Ø®ØªÛ Ù
ÙÙ
اÙ"}),(0,r.jsxs)("td",{children:[l(u.paidAmount)," تÙÙ
اÙ"]})]}
1),u.remainingAmount>0&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"باÙÛâÙ
Ø§ÙØ¯Ù"}),(0,r.jsxs)("td",{children:[l(u.remainingAmount)," تÙÙ
اÙ"]})]})]})}),(0,r.jsx)("h2",{children:"تسÙÛ٠با Ù
ÛØ²Ø¨Ø§Ù"}),(0,r.jsx)("table",{children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsxs)("th",{style:{width:260},children:["سÙÙ
ÙÛØ¯ÙÙ
ا",h.commissionPercent?" (".concat(l(h.commissionPercent),"Ùª)"):""]}),(0,r.jsxs)("td",{children:[l(h.websiteShare)," تÙÙ
اÙ"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsxs)("th",{children:["ارزش Ø§ÙØ²ÙدÙ",h.vatPercent?" (".concat(l(h.vatPercent),"Ùª از سÙÙ
ÙÛØ¯ÙÙ
ا)"):""]}),(0,r.jsxs)("td",{children:[l(h.vatAmount)," تÙÙ
اÙ"]})]}),h.hostGiftDiscount>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Ø¯Ø±ÛØ§ÙØªÛ Ù
ÛØ²Ø¨Ø§Ù Ù¾ÛØ´ از ÙØ¯ÛÙ"}),(0,r.jsxs)("td",{children:[l(h.hostShareBeforeGift)," تÙÙ
اÙ"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"تخÙÛÙ ÙØ¯ÛÙ Ù
ÛØ²Ø¨Ø§Ù"}),(0,r.jsxs)("td",{style:{color:"#C62828"},children:["â",l(h.hostGiftDiscount)," تÙÙ
اÙ"]})]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Ù
Ø¨ÙØº ÙÙØ§ÛÛ Ø¯Ø±ÛØ§Ùت Ù
ÛØ²Ø¨Ø§Ù"}),(0,r.jsx)("td",{children:(0,r.jsxs)("b",{children:[l(h.hostShare)," تÙÙ
اÙ"]})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"ÙØ§Ø±Ûز شدÙ"}),(0,r.jsxs)("td",{children:[l(u.settledAmount)," تÙÙ
اÙ"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Ù
Ø§ÙØ¯Ù ÙØ§Ø±Ûز"}),(0,r.jsx)("td",{children:(0,r.jsxs)("b",{children:[l(u.clearRemainder)," تÙÙ
اÙ"]})})]})]})}),(0,r.jsx)("p",{style:{marginTop:28,fontSize:11,color:"#777"},children:"اÛÙ ÙØ§Ú©ØªÙر از Ù¾ÙÙ Ù
Ø¯ÛØ±Ûت ÙÛØ¯ÙÙ
ا ترÛÙ¾ صادر شد٠٠Ù
Ø¨Ø§ÙØº آ٠بر اساس آخرÛÙ ÙØ¶Ø¹Ûت Ø«Ø¨ØªâØ´Ø¯ÙâÛ Ø±Ø²Ø±Ù Ø§Ø³Øª."})]})}}},function(n){n.O(0,[9791,9774,2888,179],function(){return n(n.s=20268)}),_N_E=n.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.