PageSourceSearch

https://app.nuport.io/_next/static/chunks/pages/pdf/sales-orders-d90cbbd398210b3c.js

js nuport.io collected 2026-10-01 12:14:02 UTC 7,546 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1401],{35204:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pdf/sales-orders",function(){return a(70870)}])},70870:function(e,t,a){"use strict";a.r(t);var n=a(85893),i=a(11163),s=a(67294),l=a(77279),r=a(51259),c=a(64576),o=a.n(c),d=a(30381),u=a.n(d),x=a(57517),m=a(41664),f=a.n(m);a(80008);var p=a(91531),y=a(17702);a(72468),t.default=()=>{let e;let{query:t,isReady:a}=(0,i.useRouter)(),{ids:c,toDate:d,fromDate:m,statuses:h,orderType:_,dateRangeType:v,industry:k,timezone:g,currency:N}=t,[j,D]=(0,s.useState)(!1);"SO"===_?e=!1:"STO"===_&&(e=!0);let[S,A]=(0,s.useState)([]),[b,M]=(0,s.useState)([]),[E,O]=(0,s.useState)(!0);(0,s.useEffect)(()=>{a&&(M(k?k===y.Q7.E_COMMERCE?Y.filter(e=>"areaManager"!==e.key&&"advanceAmount"!==e.key):Y.filter(e=>"deliveryPartner"!==e.key&&"dueAmount"!==e.key):Y),w())},[a]),(0,s.useEffect)(()=>{window.onafterprint=()=>{window.close()}},[]),(0,s.useEffect)(()=>{if(S.length>0&&!j||0===S.length&&!E&&!j){D(!0);let e="sales-orders.pdf";e=c?"sales-orders_selected-".concat(c.length,"_").concat(u()().format("MMM_DD_YYYY"),".pdf"):"sales-orders_".concat(u()(m).format("MMM_DD_YYYY"),"-").concat(u()(d).format("MMM_DD_YYYY"),"_").concat(h,".pdf"),document.title=e,window.print()}},[S,E,j]);let w=async()=>{try{let t;if((t=c?await l.y.index({ids:c,page:-1}):h?await l.y.index({toDate:d,fromDate:m,statuses:h.split(","),page:-1,isStockTransfer:e,dateRangeType:v}):await l.y.index({toDate:d,fromDate:m,page:-1,isStockTransfer:e,dateRangeType:v})).data){let e=t.data.results;e.sort((e,t)=>{if(e.orderDate<t.orderDate)return -1;if(e.orderDate>t.orderDate)return 1;if(e.orderDate===t.orderDate){if(e.createdAt<t.createdAt)return -1;if(e.createdAt>t.createdAt)return 1}return 0}),A(e)}}finally{O(!1)}},Y=[{title:"Delivery Date",key:"deliveryDate",render:e=>(0,n.jsxs)("div",{className:o().text,style:{display:"flex",alignItems:"center"},children:[e.staleness>0?(0,n.jsx)("div",{className:o().staleIndicator}):null,u().tz(e.deliveryDate,g).format("MMM D, YYYY")]})},{title:"Shipping Date",key:"orderDate",render:e=>(0,n.jsxs)("div",{className:o().text,style:{display:"flex",alignItems:"center"},children:[e.staleness>0?(0,n.jsx)("div",{className:o().staleIndicator}):null,u().tz(e.orderDate,g).format("MMM D, YYYY")]})},{title:"Creation Date",key:"creationDate",render:e=>(0,n.jsxs)("div",{className:o().text,style:{display:"flex",alignItems:"center"},children:[e.staleness>0?(0,n.jsx)("div",{className:o().staleIndicator}):null,u().tz(e.createdAt,g).format("MMM D, YYYY")]})},{title:"Order #",key:"salesOrderID",render:e=>!e.week&&(0,n.jsx)(f(),{href:"".concat(y.Hb.SALES_ORDERS,"/").concat(e.id),className:o().link,children:e.internalId})},{title:"Area Manager",key:"areaManager",render:e=>e.week?null:e.isStockTransfer?(0,n.jsx)("div",{className:o().unassigned,children:"N/A"}):(0,n.jsx)("div",{className:e.distributor&&e.distributor.accountManager?o().text:o().unassigned,children:e.distributor&&e.distributor.accountManager?e.distributor.accountManager.name:"Unassigned"})},{title:"Pick Up",key:"from",render:e=>(0,n.jsx)("div",{className:o().locations,children:e.pickUpLocation&&(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,n.jsx)("div",{className:o().badge,children:(0,x.Nb)(e.pickUpLocation.type.toLowerCase())}),[p.aD.WAREHOUSE,p.aD.VIRTUAL_WAREHOUSE,p.aD.FACTORY].includes(e.pickUpLocation.type)?(0,n.jsx)(f(),{href:"".concat(y.Hb.WAREHOUSES,"/").concat(e.pickUpLocation.id),children:(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[e.pickUpLocation.label,(0,n.jsx)("div",{className:o().location,children:"".concat(e.pickUpLocation.address).concat(e.pickUpLocation.internalId?" (".concat(e.pickUpLocation.internalId,")"):"")})]})}):(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[e.pickUpLocation.label,(0,n.jsx)("div",{className:o().location,children:"".concat(e.pickUpLocation.address).concat(e.pickUpLocation.internalId?" (".concat(e.pickUpLocation.internalId,")"):"")})]})]})})},{title:"Drop Off",key:"to",render:e=>(0,n.jsxs)("div",{className:o().locations,children:[e.distributor?(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginBottom:6},children:[(0,n.jsx)("div",{className:o().badge,style:{color:"#278EA5",background:"#ecf9f9"},children:(0,x.Nb)(e.distributor.type.toLowerCase())}),(0,n.jsx)(f(),{href:"".concat(y.Hb.CUSTOMERS,"/").concat(e.distributor.id),style:{color:"#278EA5"},children:(0,n.jsxs)("div",{children:["".concat(e.distributor.name).concat(e.distributor.internalName?" (".concat(e.distributor.internalName,")"):""),
1(0,n.jsx)("div",{style:{color:"#278EA5",fontSize:12},children:e.distributor.internalId})]})})]}):null,e.location&&(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[!e.distributor&&(0,n.jsx)("div",{className:o().badge,children:(0,x.Nb)(e.location.type.toLowerCase())}),[p.aD.WAREHOUSE,p.aD.VIRTUAL_WAREHOUSE,p.aD.FACTORY].includes(e.location.type)?(0,n.jsx)(f(),{href:"".concat(y.Hb.WAREHOUSES,"/").concat(e.location.id),children:(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[e.location.label,(0,n.jsx)("div",{className:o().location,children:"".concat(e.location.address).concat(e.location.internalId?" (".concat(e.location.internalId,")"):"")})]})}):(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[e.location.label,(0,n.jsx)("div",{className:o().location,children:"".concat(e.location.address).concat(e.location.internalId?" (".concat(e.location.internalId,")"):"")})]})]})]})},{title:"Sales Amount",key:"salesAmount",render:e=>(0,n.jsx)("div",{className:o().text,children:!e.week&&"".concat((0,x.cS)(e.totalAmount,!0,N))})},{title:"Advance Amount",key:"advanceAmount",render:e=>e.week?(0,n.jsx)("div",{className:o().text}):e.isStockTransfer?(0,n.jsx)("div",{className:o().text,children:"N/A"}):(0,n.jsx)("div",{className:o().text,children:"".concat((0,x.cS)(e.distributorAdvancePayment,!0,N))})},{title:"Due Amount",key:"dueAmount",render:e=>(0,n.jsx)("div",{className:o().text,children:!e.week&&"".concat((0,x.cS)(+e.totalDueAmount-+e.totalPaidAmount,!0,N))})},{title:"Payment Method",key:"paymentMethod",render:e=>e.week?null:e.isStockTransfer?(0,n.jsx)("div",{className:o().unassigned,children:"N/A"}):(0,n.jsx)("div",{className:o().text,children:!e.week&&"".concat((0,x.Nb)(e.paymentMethod))})},{title:"Delivery Partner",key:"deliveryPartner",render:e=>{let{deliveryPartner:t}=e;return(0,n.jsx)("div",{className:o().text,children:null==t?void 0:t.name})}}];return 0!==S.length||E?S.length>0&&(0,n.jsx)("div",{id:"content",className:"pdf-content",children:(0,n.jsxs)("div",{className:o().page,children:[(0,n.jsx)("img",{src:"/img/logo.svg",className:o().logo}),(0,n.jsx)(r.Z,{tableLayout:"fixed",style:{marginTop:"24px"},columns:b,dataSource:S,size:"small",pagination:!1,rowKey:"id"})]})}):(0,n.jsx)("div",{id:"content",className:"pdf-content",children:(0,n.jsx)("div",{className:o().page,children:"No Orders"})})}},64576:function(e){e.exports={page:"SalesOrders_page__ZxnyF",logo:"SalesOrders_logo__WmCZs",text:"SalesOrders_text__qrcdA",locationText:"SalesOrders_locationText__ItzrW",unassigned:"SalesOrders_unassigned__oiHMh",link:"SalesOrders_link__jg7rm",weekHeading:"SalesOrders_weekHeading__eyxhG",locations:"SalesOrders_locations__U_HkF",location:"SalesOrders_location__fAQIU",badge:"SalesOrders_badge__GdnzT"}},72468:function(){}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=35204)}),_N_E=e.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.