1"use strict";(self.webpackChunklappa_app=self.webpackChunklappa_app||[]).push([[4561],{10488:(e,s,o)=>{o.d(s,{A:()=>t});o(65043);const t=o.p+"static/media/clip.0416f960e86b91ed1a765e6cbecc8aea.svg"},11180:(e,s,o)=>{o.d(s,{O:()=>t,P:()=>r});const t=Object.freeze({SALES_LIST:"sales_list",SALES_TAX:"sales_tax",PST_RETURN:"pst_return",DAC7:"dac7",EPR_PACKAGING:"epr_packaging",EPR_NON_PACKAGING:"epr_non_packaging"});function r(e){let{reportId:s,creditType:o,useCredits:t,quickPay:r}=e;const i={report_id:Number(s),credit_type:o,use_credits:Boolean(t)};return r&&(i.quick_pay=!0),i}},22714:(e,s,o)=>{async function t(e,s){let{stripePromise:o,onError:t=()=>{}}=s;if("string"===typeof e&&e.trim())return window.location.href=e,!0;if(null!==e&&void 0!==e&&e.session_id){if(!o)return t("Stripe is not initialized. Please wait a moment and try again."),!1;try{const s=await o;if(!s)return t("Stripe is not initialized. Please wait a moment and try again."),!1;const r=await s.redirectToCheckout({sessionId:e.session_id});return null===r||void 0===r||!r.error||(t(`Payment error: ${r.error.message}`),!1)}catch(r){return console.error("Stripe redirect error:",r),t("Payment redirect failed. Please try again."),!1}}return null!==e&&void 0!==e&&e.redirect_url?(window.location.href=e.redirect_url,!0):(t("Invalid response from server"),!1)}o.d(s,{K:()=>t})},50701:(e,s,o)=>{o.d(s,{v:()=>u});var t=o(65043),r=o(97814),i=o(71616),a=o(85659),d={Tag:"Polaris-Tag",disabled:"Polaris-Tag--disabled",clickable:"Polaris-Tag--clickable",linkable:"Polaris-Tag--linkable",removable:"Polaris-Tag--removable",Button:"Polaris-Tag__Button",Link:"Polaris-Tag__Link",segmented:"Polaris-Tag--segmented",Text:"Polaris-Tag__Text",sizeLarge:"Polaris-Tag--sizeLarge",overlay:"Polaris-Tag--overlay"},c=o(87382),n=o(26699),l=o(18943);function u(e){let{children:s,disabled:o=!1,onClick:u,onRemove:m,accessibilityLabel:_,url:v,size:f}=e;const p=(0,c.s)(),h=m&&v,g=(0,i.xW)(d.Tag,o&&d.disabled,u&&d.clickable,m&&d.removable,v&&!o&&d.linkable,h&&d.segmented,f&&d[(0,i.Ny)("size",f)]);let x=_;x||(x="string"===typeof s?s:void 0);const y=t.createElement(n.E,{as:"span",variant:"bodySm",truncate:!0},t.createElement("span",{title:x,className:d.Text},s));if(u)return t.createElement("button",{type:"button",disabled:o,className:g,onClick:u},y);const C=p.translate("Polaris.Tag.ariaLabel",{children:x||""}),b=m?t.createElement("button",{type:"button","aria-label":C,className:(0,i.xW)(d.Button,h&&d.segmented),onClick:m,onMouseUp:a.bh,disabled:o},t.createElement(l.I,{source:r.S})):null,j=v&&!o?t.createElement("a",{className:(0,i.xW)(d.Link,h&&d.segmented),href:v},y):y;return t.createElement("span",{className:g,"aria-disabled":o},j,"large"===f&&t.createElement("span",{className:d.overlay}),b)}},61251:(e,s,o)=>{o.d(s,{X7:()=>Q,Q$:()=>W,Oh:()=>K,s:()=>L,Au:()=>U,O6:()=>q,pD:()=>H});var t=o(65043),r=o(53536),i=o.n(r),a=o(44154),d=o(13397),c=o(79032),n=o(93529),l=o(94291),u=o(37898),m=o(26699),_=o(50701),v=o(88270),f=o(33852),p=o(68547),h=o(10488),g=o(45178),x=o(68531),y=o(35694),C=o(42294),b=o(48422),j=o(4517),S=o(76930),R=o(70726),G=o(18317),D=o(70579);function O(e){let{showDeemed:s,sumGoodsRC:o,vatGoodsRC:t,sumGoodsRCDeemed:r,vatGoodsRCDeemed:i,sumGoodsOther:a,vatGoodsOther:d,sumGoodsOtherDeemed:c,vatGoodsOtherDeemed:n,sumServices:l,vatServices:u,sumServicesDeemed:m,vatServicesDeemed:_,sumGoodsRCCorrected:v,vatGoodsRCCorrected:f,sumGoodsOtherCorrected:p,vatGoodsOtherCorrected:h,sumServicesCorrected:g,vatServicesCorrected:x,step:y,currency:C}=e;return s?(0,D.jsxs)("div",{children:[(0,D.jsx)(G.xo,{title:"Sales of goods (RC)",sum:o,vat:t,currency:C}),y>1&&(0,D.jsx)(G.xo,{title:"Sales of goods (RC deemed)",sum:r,vat:i,currency:C}),y>2&&(0,D.jsx)(G.xo,{title:"Sales of goods (other)",sum:a,vat:d,currency:C}),y>3&&(0,D.jsx)(G.xo,{title:"Sales of goods (other deemed)",sum:c,vat:n,currency:C}),y>4&&(0,D.jsx)(G.xo,{title:"Sales of services",sum:l,vat:u,currency:C}),y>5&&(0,D.jsx)(G.xo,{title:"Sales of services (deemed)",sum:m,vat:_,currency:C}),y>6&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(G.xo,{title:"Sales of goods corrected (RC)",sum:v,vat:f,currency:C}),(0,D.jsx)(G.xo,{title:"Sales of goods corrected (other)",sum:p,vat:h,currency:C}),(0,D.jsx)(G.xo,{title:"Sales of services corrected",sum:g,vat:x,currency:C})]}),(0,D.jsx)("br",{})]}):(0,D.jsxs)("div",{children:[(0,D.jsx)(G.xo,{title:"Sales of goods (RC)",sum:o,vat:t,currency:C}),y>1&&(0,D.jsx)(G.xo,{title:"Sales of goods (other)",sum:a,vat:d,currency:C}),y>2&&(0,D.jsx)(G.xo,{title:"Sales of services",sum:l,vat:u,currency:C}),y>3&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(G.xo,{title:"Sales of goods corrected (RC)",sum:v,vat:f,currency:C}),(0,D.jsx)(G.xo,{title:"Sales of goods corrected (other)",sum:p,vat:h,currency:C}),(0,D.jsx)(G.xo,{title:"Sales of services corrected",sum:g,vat:x,currency:C})]}),(0,D.jsx)("br",{})]})}var w=o(57268);function $(e,s,o){return e.map(((e,t)=>[0===t?s:"",0===t?o:"",(0,w.up)(e.total_sum),`${e.vat_percent}%`,(0,w.up)(e.total_vat)]))}function k(e){const{showDeemed:s,sumGoodsRC:o,vatGoodsRC:t,sumGoodsRCDeemed:i,vatGoodsRCDeemed:a,sumGoodsOther:d,vatGoodsOther:c,sumGoodsOtherDeemed:n,vatGoodsOtherDeemed:l,sumServices:u,vatServices:_,sumServicesDeemed:v,vatServicesDeemed:f,sumGoodsRCCorrected:p,vatGoodsRCCorrected:h,sumGoodsOtherCorrected:g,vatGoodsOtherCorrected:x,sumServicesCorrected:y,vatServicesCorrected:C,data:b}=e,j=(0,r.isEmpty)(b)?[["-","","0","-","0"]]:b.map((e=>{const o=(0,r.isEmpty)(e.sales_of_goods_from_rc),t=(0,r.isEmpty)(e.sales_of_goods_from_rc_deemed),i=(0,r.isEmpty)(e.sales_of_goods_from_other),a=(0,r.isEmpty)(e.sales_of_goods_from_other_deemed),d=(0,r.isEmpty)(e.sales_of_services),c=(0,r.isEmpty)(e.sales_of_services_deemed),n=(0,r.isEmpty)(e.sales_of_goods_from_rc_corrected),l=(0,r.isEmpty)(e.sales_of_goods_from_other_corrected),u=$(e.sales_of_goods_from_rc,e.country,"Sales of goods (RC)"),m=$(e.sales_of_goods_from_other,s&&o&&t||!s&&o?e.country:"","Sales of goods (other)"),_=$(e.sales_of_services,s&&o&&t&&i&&a||!s&&o&&i?e.country:"","Sales of services"),v=$(e.sales_of_goods_from_rc_corrected,s&&o&&t&&i&&a&&d&&c||!s&&o&&i&&d?e.country:"","Sales of goods corrected (RC)"),f=$(e.sales_of_goods_from_other_corrected,s&&o&&t&&i&&a&&d&&c&&n||!s&&o&&i&&d&&n?e.country:"","Sales of goods corrected (other)"),p=$(e.sales_of_services_corrected,s&&o&&t&&i&&a&&d&&c&&n&&l||!s&&o&&i&&d&&n&&l?e.country:"","Sales of services corrected");let h=[],g=[],x=[];return s&&(h=$(e.sales_of_goods_from_rc_deemed,o?e.country:"","Sales of goods (RC deemed)"),g=$(e.sales_of_goods_from_other_deemed,o&&t&&i?e.country:"","Sales of goods (other deemed)"),x=$(e.sales_of_services_deemed,s&&o&&t&&i&&a&&d||o&&i?e.country:"","Sales of services (deemed)")),[...u,...h,...m,...g,..._,...x,...v,...f,...p]})).flat(),S=(0,w.up)(o+(s?i:0)+d+(s?n:0)+u+(s?v:0)+p+g+y),R=(0,w.up)(t+(s?a:0)+c+(s?l:0)+_+(s?f:0)+
1h+x+C);return j.push(function(e,s,o){return[(0,D.jsx)(m.E,{fontWeight:"semibold",variant:"bodyMd",children:e},"t"),"",(0,D.jsx)(m.E,{fontWeight:"semibold",children:s},"r"),"",(0,D.jsx)(m.E,{fontWeight:"semibold",children:o},"v")]}("Total",S,R)),j}function E(e){let{data:s,currency:o,showDeemed:r,sumGoodsRC:i,vatGoodsRC:a,sumGoodsRCDeemed:d,vatGoodsRCDeemed:c,sumGoodsOther:n,vatGoodsOther:l,sumGoodsOtherDeemed:u,vatGoodsOtherDeemed:m,sumServices:_,vatServices:v,sumServicesDeemed:f,vatServicesDeemed:p,sumGoodsRCCorrected:h,vatGoodsRCCorrected:g,sumGoodsOtherCorrected:x,vatGoodsOtherCorrected:y,sumServicesCorrected:C,vatServicesCorrected:b,step:j}=e;const{t:G}=(0,S.Bd)(),w=(0,t.useMemo)((()=>[G("createReturns.country"),"",`Revenue (${o})`,"VAT rate","VAT"]),[G,o]),$=(0,t.useMemo)((()=>k({showDeemed:r,sumGoodsRC:i,vatGoodsRC:a,sumGoodsRCDeemed:d,vatGoodsRCDeemed:c,sumGoodsOther:n,vatGoodsOther:l,sumGoodsOtherDeemed:u,vatGoodsOtherDeemed:m,sumServices:_,vatServices:v,sumServicesDeemed:f,vatServicesDeemed:p,sumGoodsRCCorrected:h,vatGoodsRCCorrected:g,sumGoodsOtherCorrected:x,vatGoodsOtherCorrected:y,sumServicesCorrected:C,vatServicesCorrected:b,data:s})),[r,i,a,d,c,n,l,u,m,_,v,f,p,h,g,x,y,C,b,s]);return(0,D.jsxs)("div",{children:[(0,D.jsx)(O,{showDeemed:r,sumGoodsRC:i,vatGoodsRC:a,sumGoodsRCDeemed:d,vatGoodsRCDeemed:c,sumGoodsOther:n,vatGoodsOther:l,sumGoodsOtherDeemed:u,vatGoodsOtherDeemed:m,sumServices:_,vatServices:v,sumServicesDeemed:f,vatServicesDeemed:p,sumGoodsRCCorrected:h,vatGoodsRCCorrected:g,sumGoodsOtherCorrected:x,vatGoodsOtherCorrected:y,sumServicesCorrected:C,vatServicesCorrected:b,step:j,currency:o}),s&&(0,D.jsx)(R.A,{columnContentTypes:["text","text","text","numeric"],headings:w,rows:$})]})}var A=o(99867);function T(e){let{currency:s,sumGoods:o,vatGoods:t,sumServices:r,vatServices:i,withDomestic:a,sumDomestic:d,vatDomestic:c,step:n}=e;return(0,D.jsxs)("div",{children:[(0,D.jsx)(G.xo,{title:"Sales of goods",sum:o,vat:t,currency:s}),n>1&&(0,D.jsx)(G.xo,{title:"Sales of services",sum:r,vat:i,currency:s}),n>2&&a&&(0,D.jsx)(G.xo,{title:"Sales domestic by OMP",sum:d,vat:c,currency:s}),(0,D.jsx)("br",{})]})}function N(e,s,o){return e.map(((e,t)=>[0===t?s:"",0===t?o:"",(0,w.up)(e.total_sum),`${e.vat_percent}%`,(0,w.up)(e.total_vat)]))}function P(e){let{sumGoods:s,vatGoods:o,sumServices:t,vatServices:i,sumDomestic:a,vatDomestic:d,data:c}=e;const n=(0,r.isEmpty)(c)?[["-","","0","-","0"]]:c.map((e=>[...N(e.sales_of_goods,e.country,"Sales of goods"),...N(e.sales_of_services,(0,r.isEmpty)(e.sales_of_goods)?e.country:"","Sales of services"),...N(e.sales_of_domestic,(0,r.isEmpty)(e.sales_of_goods)&&(0,r.isEmpty)(e.sales_of_services)?e.country:"","Sales of domestic")])).flat(),l=(0,w.up)(s+t+a),u=(0,w.up)(o+i+d);return n.push(function(e,s,o){return[(0,D.jsx)(m.E,{fontWeight:"semibold",variant:"bodyMd",children:e},"t"),"",(0,D.jsx)(m.E,{fontWeight:"semibold",children:s},"r"),"",(0,D.jsx)(m.E,{fontWeight:"semibold",children:o},"v")]}("Total",l,u)),n}function V(e){let{data:s,currency:o,sumGoods:r,vatGoods:i,sumServices:a,vatServices:d,withDomestic:c,sumDomestic:n,vatDomestic:l,step:u}=e;const{t:m}=(0,S.Bd)(),_=(0,t.useMemo)((()=>[m("createReturns.country"),"",`Revenue (${o})`,"VAT rate","VAT"]),[m,o]),v=(0,t.useMemo)((()=>P({sumGoods:r,vatGoods:i,sumServices:a,vatServices:d,sumDomestic:n,vatDomestic:l,data:s})),[r,i,a,d,n,l,s]);return(0,D.jsxs)("div",{children:[(0,D.jsx)(T,{currency:o,sumGoods:r,vatGoods:i,sumServices:a,vatServices:d,withDomestic:c,sumDomestic:n,vatDomestic:l,step:u}),s&&(0,D.jsx)(R.A,{columnContentTypes:["text","text","text","numeric"],headings:_,rows:v})]})}function F(e){let{cellData:s,user:o}=e;const t=o.is_omp?8:5,r=o.is_omp?10:7,a=!i().isEmpty(s)&&("ROW digital VAT return"===s.name||"corrected ROW digital VAT return"===s.name);return(0,D.jsxs)(D.Fragment,{children:[s.result&&(0===s._index||2===s._index)&&(0,D.jsx)(x.A,{preview:s.result,currency:s.currency}),s.result&&1===s._index&&!s.is_digital&&(0,D.jsx)(A.A,{preview:s.result,currency:s.currency}),s&&s.result&&5===s._index&&(0,D.jsx)(C.A,{sum:s.low_value_goods,sumFontSize:"14px",vat:s.vat_sum,currency:s.currency,data:s.result}),s&&s.result&&6===s._index&&(0,D.jsx)(b.A,{sumServices:s.sales_of_services,vatServices:s.vat_of_services,currency:s.currency,data:s.result,sumFontSize:"14px"}),s&&s.result&&7===s._index&&!s.splited_declaration&&(0,D.jsx)(V,{sumGoods:s.sales_of_goods,vatGoods:s.vat_of_goods,sumServices:s.sales_of_services,vatServices:s.vat_of_services,withDomestic:o.is_omp,sumDomestic:s.sales_of_domestic,vatDomestic:s.vat_of_domestic,currency:s.currency,step:t,data:s.result}),s&&s.result&&a&&(0,D.jsx)(j.A,{sumOfServices:s.sales_of_services_oss,sumOfServicesCorrected:s.sales_of_services_corrected,vatOfServices:s.vat_of_sales_of_services,vatOfServicesCorrected:s.vat_of_sales_of_services_corrected,step:t,currency:s.currency,data:s.result}),s&&s.result&&!a&&8===s._index&&(0,D.jsx)(y.A,{showDeemed:o.is_omp,sumGoodsRC:s.sales_of_goods_from_rc,vatGoodsRC:s.vat_of_sales_of_goods_from_rc,sumGoodsRCDeemed:s.sales_of_goods_from_rc_deemed,vatGoodsRCDeemed:s.vat_of_sales_of_goods_from_rc_deemed,sumGoodsOther:s.sales_of_goods_from_other,vatGoodsOther:s.vat_of_sales_of_goods_from_other,sumGoodsOtherDeemed:s.sales_of_goods_from_other_deemed,vatGoodsOtherDeemed:s.vat_of_sales_of_goods_from_other_deemed,sumServices:s.sales_of_services_oss,vatServices:s.vat_of_sales_of_services,sumServicesDeemed:s.sales_of_services_deemed,vatServicesDeemed:s.vat_of_sales_of_services_deemed,sumGoodsRCCorrected:s.sales_of_goods_from_rc_corrected,vatGoodsRCCorrected:s.vat_of_sales_of_goods_from_rc_corrected,sumGoodsOtherCorrected:s.sales_of_goods_from_other_corrected,vatGoodsOtherCorrected:s.vat_of_sales_of_goods_from_other_corrected,sumServicesCorrected:s.sales_of_services_corrected,vatServicesCorrected:s.vat_of_sales_of_services_corrected,currency:s.currency,step:r,data:s.result,totalSumDue:s.total_sum_due,totalVatDue:s.total_vat_due,totalSumRefund:s.total_sum_refund,totalVatRefund:s.total_vat_refund}),s&&s.result&&7===s._index&&s.splited_declaration&&(0,D.jsx)(E,{showDeemed:o.is_omp,sumGoodsRC:s.sales_of_goods_from_rc,vatGoodsRC:s.vat_of_goods_from_rc,sumGoodsRCDeemed:s.sales_of_goods_from_rc_deemed,vatGoodsRCDeemed:s.vat_of_goods_from_rc_deemed,sumGoodsOther:s.sales_of_goods_from_other,vatGoodsOther:s.vat_of_goods_from_other,sumGoodsOtherDeemed:s.sales_of_goods_from_other_deemed,vatGoodsOtherDeemed:s.vat_of_goods_from_other_deemed,sumServices:s.sales_of_services,vatServices:s.vat_of_services,sumServicesDeemed:s.sales_of_services_deemed,vatServicesDeemed:s.vat_of_services_deemed,sumGoodsRCCorrected:s.sales_of_goods_from_rc_corrected,vatGoodsRCCorrected:s.vat_of_goods_from_rc_corrected,sumGoodsOtherCorrected:s.sales_of_goods_from_other_corrected,vatGoodsOtherCorrected:s.vat_of_goods_from_other_corrected,sumServicesCorrected:s.sales_of_services_corrected,vatServicesCorrected:s.vat_of_services_corrected,currency:s.currency,step:t,data:s.result})]})}var M=o(26229),z=o(20475);o(71139);function B(e){let{creditData:s,t:o}=e;const r=(0,t.useMemo)((()=>{const e=null===s||void 0===s?void 0:s.currency;return null!=e&&""!==String(e).trim()?String(e).trim():"EUR"}),[null===s||void 0===s?void 0:s.currency]),i=(0,z.Q)(r),a=r.toUpperCase(),d=e=>null!=e&&""!==e?`${(0,w.up)(e)}${i}`:"\u2014",c=e=>null!=e&&""!==e?String(e):"\u2014",n=[o("vatReturns.creditTable.credits"),o("vatReturns.creditTable.pricePerOne"),o("vatReturns.creditTable.quantity"),o("vatReturns.creditTable.total")].map(((e,s)=>(0,D.jsx)("div",{style:{fontWeight:"500",color:"rgba(112, 112, 112, 1)",fontSize:"14px",textAlign:s>=2?"right":"left"},children:e},e))),l=[[c(null===s||void 0===s?void 0:s.name),d(null===s||void 0===s?void 0:s.price_per_one),c(null===s||void 0===s?void 0:s.quantity),d(null===s||void 0===s?void 0:s.price)]],u=null!=(null===s||void 0===s?void 0:s.price)&&""!==(null===s||void 0===s?void 0:s.price)?`${(0,w.qy)(Number(s.price))} ${a}`:"\u2014";return(0,D.jsxs)("div",{className:"rebuilding-subscription_modal
1-wrapper_body",children:[(0,D.jsx)("div",{className:"rebuilding-subscription_modal-wrapper_body-table vat-returns-credit-purchase-table",style:{border:"1px solid #e1e3e5",borderRadius:"8px",overflow:"hidden",marginBottom:"20px"},children:(0,D.jsx)(M.b,{columnContentTypes:["text","text","numeric","text"],headings:n,rows:l,hideScrollIndicator:!0})}),(0,D.jsxs)("div",{className:"rebuilding-subscription_modal-wrapper_body-total",children:[o("vatReturns.creditTable.totalLabel")," ",u]})]})}var I=o(91265);function W(e){let{t:s,open:o,onClose:t}=e;return(0,D.jsx)(p.A,{title:s("vatReturns.hmrcInt"),description:s("vatReturns.connectHmrc"),onClose:t,visible:o,footer:(0,D.jsxs)(a.e,{fullWidth:!0,children:[(0,D.jsx)(d.$,{onClick:t,size:"large",children:s("vatReturns.close")}),(0,D.jsx)(d.$,{primary:!0,onClick:()=>{if(!(0,g.Ri)("api_key")){const e=localStorage.getItem("api_key"),s=new Date,o=new Date(s.getTime()+6048e5);(0,g.TV)("api_key",e,{expires:o,path:"/"})}window.location=`${window.location.protocol}//${window.location.hostname}/api/1/integrations/hmrc?production=true`},size:"large",children:s("vatReturns.connect")})]})})}function L(e){let{t:s,user:o,open:t,cellData:r,onClose:a}=e;return i().isEmpty(r)?null:(0,D.jsx)(p.A,{title:r.name,description:(0,D.jsx)(D.Fragment,{children:1===r._index&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("p",{children:[o.company.name.toUpperCase(),", ",s("vatReturns.vatNumber"),": ",o.company.info.default_vat_number]}),(0,D.jsx)("p",{children:`${s("vatReturns.forPeriod1")} ${r.period} ${r.period_type} ${r.period_year} ${r.customer_country?` ${s("vatReturns.forPeriod2")} ${r.customer_country.name}`:""}`})]})}),className:o.is_omp?"vat-omp":"",infoIconVisible:!1,visible:t,onClose:a,content:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("br",{}),(0,D.jsx)(F,{cellData:r,user:o})]})})}function q(e){let{t:s,user:o,open:t,cellData:r,isChecked:n,submitting:l,submitError:u,onClose:m,onCheckedChange:_,onSubmit:v}=e;if(i().isEmpty(r))return null;const h=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("div",{className:"modal-disclaimer-checkbox",children:(0,D.jsx)(c.S,{label:(0,D.jsx)("span",{className:"modal-disclaimer-checkbox__text",children:s("vatReturns.clickObSubmit")}),checked:n,onChange:_})}),u&&(0,D.jsx)(f.A,{status:"critical",message:u}),r.message&&(0,D.jsx)(f.A,{status:"critical",message:r.message}),(0,D.jsx)("div",{style:{width:"60%",marginLeft:"auto",marginTop:"1rem"},children:(0,D.jsxs)(a.e,{fullWidth:!0,children:[(0,D.jsx)(d.$,{onClick:m,children:s("vatReturns.cancel")}),(0,D.jsx)(d.$,{variant:"primary",loading:l,onClick:v,disabled:!n||"undefined"!==typeof u||r.result&&1===r._index&&!r.is_digital&&r.message,children:s("vatReturns.submit")})]})})]});return(0,D.jsx)(p.A,{title:r.name,className:o.is_omp?"vat-omp":"",visible:t,infoIconVisible:!1,onClose:m,content:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("br",{}),(0,D.jsxs)("div",{children:[(0===r._index||2===r._index)&&(0,D.jsx)("p",{children:`${s("vatReturns.wantSubmit1")} ${r.period} ${r.period_type} ${r.period_year} ${r.customer_country?` ${s("vatReturns.wantSubmit2")} ${r.customer_country.name}${s("vatReturns.wantSubmit3")}`:""}?`}),1===r._index&&(0,D.jsxs)("div",{children:[(0,D.jsxs)("p",{children:[o.company.name.toUpperCase(),", ",s("vatReturns.vatNumber"),": ",o.company.info.default_vat_number]}),(0,D.jsx)("p",{children:`${s("vatReturns.forPeriod1")} ${r.period} ${r.period_type} ${r.period_year} ${r.customer_country?` ${s("vatReturns.forPeriod2")} ${r.customer_country.name}`:""}`}),(0,D.jsx)("br",{})]})]}),(0,D.jsx)(F,{cellData:r,user:o})]}),footer:h})}function U(e){let{t:s,open:o,cellData:t,statusArr:r,status:i,declineReason:a,changeVatReturnSuccess:c,errorChangeVatReturn:m,editingVatReturnStatus:_,onClose:v,onStatusChange:h,onDeclineReasonChange:g,onSubmit:x}=e;return(0,D.jsx)(p.A,{title:`${s("vatReturns.taxReturn")} ${t&&t.id?`${t.period} ${t.period_type} ${t.period_year} ${t.customer_country.name}`:""}`,size:"medium",visible:o,infoIconVisible:!1,onClose:v,content:(0,D.jsxs)(n.H,{children:[(0,D.jsx)("br",{}),c&&(0,D.jsx)(f.A,{status:"success",message:s("vatReturns.statusChanged")}),m&&(0,D.jsx)(f.A,{status:"critical",message:m}),(0,D.jsx)(n.H.Group,{children:(0,D.jsx)(l.l,{id:"status",label:s("vatReturns.selectStatus"),options:r,onChange:h,value:i||t&&t.status})}),("declined"===i||t&&"declined"===t.status&&!i)&&(0,D.jsx)(n.H.Group,{children:(0,D.jsx)(u.A,{id:"declineReason",label:"Message",placeholder:"Enter message",value:a||"",onChange:g,multiline:3})})]}),footer:(0,D.jsxs)(d.$,{variant:"primary",loading:_,disabled:!i,onClick:x,children:["\xa0\xa0",s("vatReturns.edit"),"\xa0\xa0"]})})}function H(e){let{t:s,open:o,data:t,fileNames:r,sendError:a,onClose:c,onSelectFile:n,onDeleteFile:l,onUpload:u}=e;if(!o||i().isEmpty(t))return null;const v="string"===typeof a?a:a?(null===a||void 0===a?void 0:a.message)||String(a):null;return(0,D.jsx)(p.A,{title:s("vatReturns.taxReturn"),visible:o,infoIconVisible:!1,onClose:c,content:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("br",{}),a&&(0,D.jsx)(f.A,{status:"critical",message:v}),(0,D.jsxs)("div",{children:[i().isEmpty(r)&&(0,D.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,D.jsx)(d.$,{size:"micro",icon:(0,D.jsx)("img",{src:h.A,alt:"clip",style:{marginTop:4}}),onClick:n,children:s("vatReturns.addFile")}),(0,D.jsx)(m.E,{variant:"bodyMd",color:"subdued",children:s("vatReturns.chooseFile")})]}),r.map((e=>(0,D.jsx)(_.v,{onRemove:()=>l(e),children:e},e)))]})]}),footer:(0,D.jsx)(d.$,{variant:"primary",disabled:i().isEmpty(r),onClick:u,children:s("vatReturns.uploadFile")})})}function K(e){var s;let{t:o,user:t,open:r,cellData:a,writeOffResponse:n,hasCredits:l,isCreditsAckChecked:u,payCreditError:_,payCreditLoading:h,onCreditsAckChange:g,onClose:x,onBuyBundle:y,onQuickBuyViaCreditCard:C,onConfirm:b,hideBuyBundle:j=!1,modalTitle:S,confirmButtonLabel:R,creditAckMessage:G}=e;if(!r)return null;if(i().isEmpty(a)&&!S)return null;const O="boolean"===typeof l?l:Boolean(null===n||void 0===n?void 0:n.has_credits),w=null===n||void 0===n?void 0:n.credit_data,$=null!=w&&(null!=w.price||null!=w.price_per_one||null!=w.quantity||null!=w.name&&""!==String(w.name).trim()),k=!O&&$,E="string"===typeof G&&G.trim()||"string"===typeof(null===a||void 0===a?void 0:a.creditAckMessage)&&a.creditAckMessage.trim()||"string"===typeof(null===n||void 0===n?void 0:n.message)&&n.message.trim()||"",A=E||"\u2014",T=!i().isEmpty(w),N=O&&!u,P=O?(0,D.jsx)("div",{className:"modal-disclaimer-checkbox",children:(0,D.jsx)(c.S,{label:(0,D.jsx)("span",{className:"modal-disclaimer-checkbox__text",children:E||o("vatReturns.clickObSubmit")}),checked:u,onChange:g})}):k?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"rebuilding-subscription_modal
1-wrapper_warning",children:[(0,D.jsx)("div",{className:"rebuilding-subscription_modal-wrapper_warning-icon",children:(0,D.jsx)(I.h,{className:"rebuilding-subscription_modal-wrapper_warning-icon_svg"})}),(0,D.jsxs)("div",{className:"rebuilding-subscription_modal-wrapper_content",children:[(0,D.jsx)("h2",{className:"rebuilding-subscription_modal-wrapper_content-title",children:o("vatReturns.insufficientCreditsTitle")}),(0,D.jsx)("p",{className:"rebuilding-subscription_modal-wrapper_content-subtitle",children:A})]})]}),(0,D.jsx)(B,{creditData:w,t:o})]}):E?(0,D.jsx)(m.E,{variant:"bodyMd",color:"subdued",as:"p",children:E}):null,V=(0,D.jsxs)(D.Fragment,{children:[O||!E||k?null:(0,D.jsx)(m.E,{variant:"bodyMd",color:"subdued",as:"p",children:E}),_?(0,D.jsx)(f.A,{status:"critical",message:_}):null,(0,D.jsx)("div",{style:{marginTop:"1rem",width:"100%"},children:O?(0,D.jsxs)(v.o,{align:"end",gap:"200",wrap:!1,children:[(0,D.jsx)(d.$,{onClick:x,children:o("vatReturns.cancel")}),(0,D.jsx)(d.$,{variant:"primary",loading:h,disabled:N,onClick:b,children:null!==R&&void 0!==R?R:o("vatReturns.submit")})]}):(0,D.jsxs)(v.o,{align:"end",gap:"200",wrap:!1,children:[(0,D.jsx)(d.$,{onClick:x,children:o("vatReturns.cancel")}),j?null:(0,D.jsx)(d.$,{onClick:y,children:o("vatReturns.buyBundle")}),(0,D.jsx)(d.$,{variant:"primary",loading:h,disabled:!T,onClick:C,children:o("vatReturns.quickBuyViaCreditCard")})]})})]}),F=null!==(s=null!==S&&void 0!==S?S:null===a||void 0===a?void 0:a.name)&&void 0!==s?s:"";return(0,D.jsx)(p.A,{title:F,className:t.is_omp?"vat-omp":"",visible:r,infoIconVisible:!1,onClose:x,content:P,footer:V})}function Q(e){let{t:s,open:o,data:t,onClose:r,onConfirmDelete:c}=e;return!o||i().isEmpty(t)?null:(0,D.jsx)(p.A,{title:s("vatReturns.delete"),description:(0,D.jsx)("div",{style:{maxWidth:"300px",margin:"0 auto"},children:`Do you want delete ${t.name} for the period ${t.period} ${t.period_type} ${t.period_year}?`}),contentOnCenter:!0,iconType:"danger",onClose:r,visible:o,footer:(0,D.jsxs)(a.e,{fullWidth:!0,children:[(0,D.jsx)(d.$,{size:"large",onClick:r,children:s("vatReturns.cancel")}),(0,D.jsx)(d.$,{size:"large",tone:"critical",variant:"plain",onClick:()=>c(t.id),children:s("vatReturns.delete")})]})})}},64913:(e,s,o)=>{function t(e){let{page:s,perPage:o}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=s-1||0,r=Math.ceil(e.length/o),i=t<r?t:0;return{amount:r,rows:e.slice(i*o,i*o+o),page:i}}}o.d(s,{A:()=>t})}}]); 2//# sourceMappingURL=4561.dca9cc69.chunk.js.map
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.