1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[816],{7110:function(e,t,n){var i=n(7568),r=n(92),o=n(5893),s=n(7294),l=function(e){var t=e.match(/\(([^)]+)\)$/);return t?t[1]:e.replace(/^(PAID\s*-\s*GO AHEAD|PART[- ]PAYMENT[^(]*)/i,"").trim()||e},d={container:{maxWidth:"780px",margin:"0 auto",paddingTop:"60px",paddingBottom:"60px"},page:{background:"#fff",width:"100%",padding:"40px 48px",fontFamily:"Arial, Helvetica, sans-serif",fontSize:"14px",color:"#222",lineHeight:1.5,boxSizing:"border-box"},header:{display:"flex",alignItems:"center",gap:"20px",marginBottom:"32px"},logo:{width:"240px",height:"auto",objectFit:"contain",flexShrink:0,margin:"0 1rem"},invoiceTitle:{fontSize:"26px",fontWeight:800,color:"#7B1A1A",marginBottom:"16px",letterSpacing:"0.5px"},receiptTitle:{fontSize:"30px",fontWeight:800,color:"#333",marginBottom:"16px",letterSpacing:"0.5px"},twoCol:{display:"flex",justifyContent:"space-between",gap:"24px",marginBottom:"28px"},orderDetailsBlock:{flex:1},orderDetailsTitle:{fontWeight:700,marginBottom:"6px"},orderDetailsRow:{margin:"2px 0"},companyBlock:{textAlign:"right",flex:"0 0 auto"},companyName:{fontWeight:700,marginBottom:"4px"},companyAddress:{marginBottom:"8px"},stackedLine:{display:"block"},companyLink:{color:"#C0392B",textDecoration:"none",display:"block"},table:{width:"100%",borderCollapse:"collapse",marginBottom:"28px"},thBase:{padding:"10px 12px",color:"#fff",fontWeight:600,fontSize:"13px",textAlign:"left",backgroundColor:"#8B1A1A"},tdBase:{padding:"9px 12px",border:"1px solid #ddd",fontSize:"13px",verticalAlign:"middle"},tdNum:{padding:"9px 12px",border:"1px solid #ddd",fontSize:"13px",verticalAlign:"middle",textAlign:"center"},tdRight:{padding:"9px 12px",border:"1px solid #ddd",fontSize:"13px",verticalAlign:"middle",textAlign:"right",fontWeight:700},totalRow:{borderTop:"2px solid #ccc"},totalLabelCell:{padding:"10px 12px",border:"1px solid #ddd",fontWeight:700,textAlign:"right",fontSize:"14px"},totalValueCell:{padding:"10px 12px",border:"1px solid #ddd",fontWeight:800,textAlign:"right",fontSize:"14px"},bankSection:{marginBottom:"20px",lineHeight:1.8},nbNote:{marginBottom:"20px"},thankYou:{marginBottom:"28px"},amountPaid:{fontSize:"16px",fontWeight:700,marginBottom:"4px"},paymentMethod:{fontSize:"16px",fontWeight:700,marginBottom:"28px"},signOff:{marginTop:"28px",lineHeight:1.8,color:"#444"},downloadBtn:{display:"inline-block",padding:"10px 24px",background:"#8B1A1A",color:"#fff",border:"none",borderRadius:"4px",fontSize:"14px",cursor:"pointer",fontWeight:600},printBtn:{display:"inline-block",padding:"10px 24px",background:"#fff",color:"#8B1A1A",border:"2px solid #8B1A1A",borderRadius:"4px",fontSize:"14px",cursor:"pointer",fontWeight:600},copyUrlBtn:{display:"inline-block",padding:"10px 24px",background:"#fff",color:"#555",border:"2px solid #ccc",borderRadius:"4px",fontSize:"14px",cursor:"pointer",fontWeight:600},copyUrlBtnCopied:{display:"inline-block",padding:"10px 24px",background:"#fff",color:"#1B5E20",border:"2px solid #1B5E20",borderRadius:"4px",fontSize:"14px",cursor:"default",fontWeight:600},downloadBtnContainer:{display:"flex",justifyContent:"flex-end",gap:"12px",marginBottom:"12px"}};t.Z=function(e){var t,a,c=e.receiptInvoiceOrder,p=e.type,x=c.orderProducts.reduce((function(e,t){return e+t.price*(t.quantity||1)}),0),h=c.amount-x,g=(c.adminFullName||"").trim(),u=(c.signOffName||g).trim(),m=(c.signOffPhone||"").trim(),f=(c.bankName||"Moniepoint MFB").trim(),y=(c.bankAccountNumber||"8294717472").trim(),j=(c.bankAccountName||"Regalflowers Ikoyi").trim(),b=(0,s.useState)(!1),v=b[0],B=b[1],w=function(){var e=(0,i.Z)((function(){var e,t,i,o,s,l,d,a,x;return(0,r.__generator)(this,(function(r){switch(r.label){case 0:return(e=document.querySelector("[data-document-page]"))?[4,n.e(443).then(n.t.bind(n,1120,23))]:[2];case 1:return t=r.sent().default,[4,Promise.all([n.e(655),n.e(847),n.e(776)]).then(n.bind(n,1819))];case 2:return i=r.sent().jsPDF,[4,t(e,{scale:1.5,useCORS:!0})];case 3:return o=r.sent(),s=o.toDataURL("image/jpeg",.92),l=new i("p","mm","a4"),d=l.internal.pageSize.getWidth(),a=o.height*d/o.width,l.addImage(s,"JPEG",0,0,d,a),x=c.websiteOrderID||c.orderID,l.save("".concat(p,"-").concat(x,".pdf")),[2]}}))}));return function(){return e.apply(this,arguments)}}(),k=function(){var e=(0,i.Z)((function(){return(0,r.__generator)(this,(function(e){switch(e.label){case 0:return[4,navigator.clipboard.writeText(window.location.href)];case 1:return e.sent(),B(!0),setTimeout((function(){return B(!1)}),2e3),[2]}}))}));return function(){return e.apply(this,arguments)}}(),A=c.orderProducts.length+1,S=Math.max(0,5-A);return(0,o.jsxs)("div",{style:d.container,children:[(0,o.jsxs)("div",{style:d.downloadBtnContainer,children:[(0,o.jsx)("button",{className:"no-print",style:v?d.copyUrlBtnCopied:d.copyUrlBtn,onClick:k,disabled:v,children:v?"Copied!":"Copy URL"}),(0,o.jsx)("button",{className:"no-print",style:d.printBtn,onClick:function(){window.print()},children:"Print"}),(0,o.jsx)("button",{className:"no-print",style:d.downloadBtn,onClick:w,children:"Download PDF"})]}),(0,o.jsxs)("div",{style:d.page,"data-document-page":!0,children:[(0,o.jsx)("div",{style:d.header,children:(0,o.jsx)("img",{src:"/icons/regal-flowers-gifts-logo-small.png",alt:"Regal Flowers logo",style:d.logo})}),(0,o.jsx)("div",{style:"invoice"===p?d.invoiceTitle:d.receiptTitle,children:"invoice"===p?"INVOICE":"PAYMENT RECEIPT"}),(0,o.jsxs)("div",{style:d.twoCol,children:[(0,o.jsxs)("div",{style:d.orderDetailsBlock,
1children:[(0,o.jsx)("div",{style:d.orderDetailsTitle,children:"Order Details"}),(0,o.jsxs)("div",{style:d.orderDetailsRow,children:[(0,o.jsx)("strong",{children:"Client:"}),"\xa0\xa0",c.client.name]}),(0,o.jsxs)("div",{style:d.orderDetailsRow,children:[(0,o.jsx)("strong",{children:"Order No:"}),"\xa0",c.websiteOrderID||c.orderID]}),(0,o.jsxs)("div",{style:d.orderDetailsRow,children:[(0,o.jsx)("strong",{children:"Delivery\xa0Date:"}),"\xa0",c.deliveryDate]}),(0,o.jsxs)("div",{style:d.orderDetailsRow,children:[(0,o.jsx)("strong",{children:"Delivery Address:"}),"\xa0",c.recipientAddress]})]}),(0,o.jsxs)("div",{style:d.companyBlock,children:[(0,o.jsxs)("div",{style:d.orderDetailsRow,children:[(0,o.jsx)("strong",{children:"Date:"}),"\xa0\xa0",c.deliveryDate]}),(0,o.jsx)("div",{style:d.companyName,children:"Regalflowers Limited"}),(0,o.jsxs)("div",{style:d.companyAddress,children:[(0,o.jsx)("span",{style:d.stackedLine,children:"81b Lafiaji Way, Dolphin Estate"}),(0,o.jsx)("span",{style:d.stackedLine,children:"Ikoyi Lagos"})]}),(0,o.jsx)("a",{href:"https://regalflowers.com.ng",style:d.companyLink,children:"www.regalflowers.com.ng"}),(0,o.jsx)("a",{href:"mailto:[email protected]",style:d.companyLink,children:"[email protected]"})]})]}),(0,o.jsxs)("table",{style:d.table,children:[(0,o.jsx)("thead",{children:(0,o.jsx)("tr",{children:["S/N","Item Description","Size","Price Unit","QTY","Total"].map((function(e){return(0,o.jsx)("th",{style:d.thBase,children:e},e)}))})}),(0,o.jsxs)("tbody",{children:[c.orderProducts.map((function(e,t){return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{style:d.tdNum,children:t+1}),(0,o.jsx)("td",{style:d.tdBase,children:e.nameClient||e.name}),(0,o.jsx)("td",{style:d.tdBase,children:e.size||""}),(0,o.jsx)("td",{style:d.tdNum,children:e.price.toLocaleString("en-NG")}),(0,o.jsx)("td",{style:d.tdNum,children:e.quantity}),(0,o.jsx)("td",{style:d.tdRight,children:(e.price*(e.quantity||1)).toLocaleString("en-NG")})]},t)})),(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase,children:"Delivery"}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdRight,children:h>0?h.toLocaleString("en-NG"):""})]}),Array.from({length:S}).map((function(e,t){return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase})]},"empty-".concat(t))})),(0,o.jsxs)("tr",{style:d.totalRow,children:[(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.totalLabelCell,children:"Total"}),(0,o.jsx)("td",{style:d.tdBase}),(0,o.jsx)("td",{style:d.totalValueCell,children:c.amount.toLocaleString("en-NG")})]})]})]}),"invoice"===p&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{style:d.bankSection,children:[(0,o.jsx)("div",{children:"Kindly make payment into our account below, and please notify us after"}),(0,o.jsxs)("div",{children:["Bank: ",f]}),(0,o.jsxs)("div",{children:["Account Number: ",y]}),(0,o.jsxs)("div",{children:["Account Name: ",j]})]}),(0,o.jsxs)("div",{style:d.nbNote,children:[(0,o.jsx)("strong",{children:"NB:"})," Prices valid for 2 weeks from invoice date."]})]}),"receipt"===p&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{style:d.amountPaid,children:[(0,o.jsx)("strong",{children:"Amount Paid:"}),"\xa0",(a=c.amount,"\u20a6".concat(a.toLocaleString("en-NG")))]}),(0,o.jsxs)("div",{style:d.paymentMethod,children:[(0,o.jsx)("strong",{children:"Payment Method:"}),"\xa0",l(c.paymentStatus)]})]}),(0,o.jsx)("div",{style:d.thankYou,children:"Thank you for choosing Regal Flowers and Gifts"}),(0,o.jsxs)("div",{style:d.signOff,children:[(0,o.jsx)("div",{children:"Warm regards,"}),(0,o.jsx)("a",{href:"https://regalflowers.com.ng",style:d.companyLink,children:"Regalflowers.com.ng"}),u&&(0,o.jsx)("div",{children:u}),(0,o.jsx)("div",{children:"Customer Experience Team"}),m&&(0,o.jsx)("a",{href:(t=m,"tel:".concat(t.replace(/[^\d+]/g,""))),style:d.companyLink,children:m})]})]})]})}},9274:function(e,t,n){n.d(t,{O:function(){return s}});var i=n(7568),r=n(92),o=n(6026),s=function(){var e=(0,i.Z)((function(e){var t,n;return(0,r.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),"https://regal-operations-defy.appspot.com",[4,fetch("".concat("https://regal-operations-defy.appspot.com","/v1/firebase/order-document/").concat(e,"?business=").concat(o.kR))];case 1:return(t=i.sent()).ok?[3,3]:[4,t.json()];case 2:throw i.sent();case 3:return[4,t.json()];case 4:return[2,{error:!1,data:i.sent().data}];case 5:return[2,{error:!0,message:(null===(n=i.sent())||void 0===n?void 0:n.message)||"Failed to fetch order",data:null,status:null===n||void 0===n?void 0:n.status}];case 6:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}()}}]);
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.