1(this["webpackJsonpgeetee-web"]=this["webpackJsonpgeetee-web"]||[]).push([[64],{1874:function(t,e,r){"use strict";r.r(e);var n=r(0),i=r(40),o=r(102),c=r(237),l=r(307),a=r(417),s=r(395),u=r(90),d=r.n(u),f=r(2),b=Object(c.a)((function(t){return{root:{display:"flex",justifyContent:"center",width:"100%"},content:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px",margin:"auto"},buttonRow:{marginBottom:"20px",marginTop:"20px"}}})),p="#000000",j="#D9D9D9",m=a.f.create({page:{flexDirection:"column",fontFamily:"Helvetica",padding:20,fontSize:8},subtitle:{fontSize:9,textAlign:"center",marginBottom:8},table:{width:"100%",borderTopWidth:1,borderTopStyle:"solid",borderTopColor:p,borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:p,marginBottom:14},row:{flexDirection:"row"},cell:{paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,borderRightWidth:1,borderRightStyle:"solid",borderRightColor:p,borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:p,textAlign:"right"},cellCenter:{textAlign:"center"},bold:{fontFamily:"Helvetica-Bold"}}),h=function(t,e){var r=t.toDecimalPlaces(e);return r.isZero()?"":r.toNumber().toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e})},x=function(t,e){var r=t.toDecimalPlaces(e),n=r.abs().toNumber().toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e});return r.isNegative()?"(".concat(n,")"):n},O=function(t){return Object(f.jsx)(a.h,{style:[m.cell,{width:t.width,backgroundColor:t.fill||"#FFFFFF"},t.center?m.cellCenter:{}],children:Object(f.jsx)(a.g,{style:t.bold?m.bold:{},children:t.children})})},g=Object(i.i)((function(t){var e=b(),r=t.report,n=r.jurisdictions,i="8%",o="".concat(46,"%"),c="".concat(46/(n.length+1),"%");return Object(f.jsx)("div",{className:e.root,children:Object(f.jsxs)("div",{className:e.content,children:[Object(f.jsx)("div",{className:e.buttonRow,children:Object(f.jsx)(l.a,{variant:"contained",startIcon:Object(f.jsx)(d.a,{}),onClick:function(){return t.history.goBack()},children:"Back"})}),Object(f.jsx)(s.a,{document:Object(f.jsx)(a.a,{children:Object(f.jsxs)(a.e,{size:"A4",style:m.page,wrap:!0,orientation:"landscape",children:[Object(f.jsxs)(a.g,{style:m.subtitle,children:["Covering: ",t.startDate," to ",t.endDate]}),Object(f.jsxs)(a.h,{style:m.table,children:[Object(f.jsxs)(a.h,{style:m.row,fixed:!0,children:[Object(f.jsx)(O,{width:i,fill:j,bold:!0,center:!0,children:"Truck #"}),Object(f.jsx)(O,{width:o,fill:j,bold:!0,center:!0,children:"Litres"}),Object(f.jsx)(O,{width:o,fill:j,bold:!0,center:!0,children:"KM's"})]}),Object(f.jsxs)(a.h,{style:m.row,fixed:!0,children:[Object(f.jsx)(O,{width:i,fill:j,bold:!0,center:!0}),n.map((function(t){return Object(f.jsx)(O,{width:c,fill:j,bold:!0,center:!0,children:t.code},"litreHead"+t.code)})),Object(f.jsx)(O,{width:c,fill:j,bold:!0,center:!0,children:"Total"}),n.map((function(t){return Object(f.jsx)(O,{width:c,fill:j,bold:!0,center:!0,children:t.code},"kmHead"+t.code)})),Object(f.jsx)(O,{width:c,fill:j,bold:!0,center:!0,children:"Total"})]}),r.trucks.map((function(t,e){var r=e%2===0?"#FFFFFF":"#F2F2F2";return Object(f.jsxs)(a.h,{style:m.row,wrap:!1,children:[Object(f.jsx)(O,{width:i,fill:"#DDEBF7",bold:!0,center:!0,children:t.unitNumber}),n.map((function(e){return Object(f.jsx)(O,{width:c,fill:r,children:h(t.litres[e.code],2)},"litre"+e.code)})),Object(f.jsx)(O,{width:c,fill:r,bold:!0,children:x(t.litresTotal,2)}),n.map((function(e){return Object(f.jsx)(O,{width:c,fill:r,children:h(t.km[e.code],0)},"km"+e.code)})),Object(f.jsx)(O,{width:c,fill:r,bold:!0,children:x(t.kmTotal,0)})]},t.unitDocId)})),Object(f.jsxs)(a.h,{style:m.row,wrap:!1,children:[Object(f.jsx)(O,{width:i,fill:j,bold:!0,center:!0,children:"Total"}),n.map((function(t){return Object(f.jsx)(O,{width:c,fill:j,bold:!0,children:x(r.totals.litres[t.code],2)},"litreTotal"+t.code)})),Object(f.jsx)(O,{width:c,fill:j,bold:!0,children:x(r.totals.litresTotal,2)}),n.map((function(t){return Object(f.jsx)(O,{width:c,fill:j,bold:!0,children:x(r.totals.km[t.code],0)},"kmTotal"+t.code)})),Object(f.jsx)(O,{width:c,fill:j,bold:!0,children:x(r.totals.kmTotal,0)})]})]})]})}),maxHeight:"85vh"})]})})})),T=r(541),w=r(423),v=r(26),y=r(546),k=r.n(y),D=r(789),E=["ON","AB","MB","SK"],_=function(t,e){var r=new Map((e||[]).map((function(t){return[t.docId,t]}))),n=Object(v.a)(new Set(t.map((function(t){return t.jurisdiction})).filter((function(t){return t&&!E.includes(t)}
1)))).sort(),i=[].concat(Object(v.a)(E),Object(v.a)(n)).map((function(t){return{code:t}})),o=function(){return Object.fromEntries(i.map((function(t){return[t.code,new k.a(0)]})))},c=new Map;t.forEach((function(t){if(!c.has(t.unitDocId)){var e=r.get(t.unitDocId);c.set(t.unitDocId,{unitDocId:t.unitDocId,unitNumber:e?e.unitNumber:t.unitDocId,litres:o(),km:o(),litresTotal:new k.a(0),kmTotal:new k.a(0)})}var n=c.get(t.unitDocId),i=function(t){return(Array.isArray(t.litres)?t.litres:t.litres?[t.litres]:[]).reduce((function(t,e){return t.plus(Object(D.b)(e))}),new k.a(0))}(t),l=function(t){return new k.a(Object(D.b)(t.exitOdometer)).minus(Object(D.b)(t.enterOdometer))}(t);n.litres[t.jurisdiction]||(n.litres[t.jurisdiction]=new k.a(0),n.km[t.jurisdiction]=new k.a(0)),n.litres[t.jurisdiction]=n.litres[t.jurisdiction].plus(i),n.km[t.jurisdiction]=n.km[t.jurisdiction].plus(l),n.litresTotal=n.litresTotal.plus(i),n.kmTotal=n.kmTotal.plus(l)}));var l=Object(v.a)(c.values()).sort((function(t,e){return String(t.unitNumber).localeCompare(String(e.unitNumber),void 0,{numeric:!0})})),a={litres:o(),km:o(),litresTotal:new k.a(0),kmTotal:new k.a(0)};return l.forEach((function(t){i.forEach((function(e){a.litres[e.code]=a.litres[e.code].plus(t.litres[e.code]),a.km[e.code]=a.km[e.code].plus(t.km[e.code])})),a.litresTotal=a.litresTotal.plus(t.litresTotal),a.kmTotal=a.kmTotal.plus(t.kmTotal)})),{jurisdictions:i,trucks:l,totals:a}};e.default=Object(i.i)(Object(o.b)((function(t){return{printData:t.printing.key===w.a.IFTA_REPORT?t.printing.payload:null}}))((function(t){var e=Object(n.useMemo)((function(){return t.printData?_(t.printData.rows,t.printData.units):null}),[t.printData]);return t.printData?Object(f.jsx)(g,{report:e,startDate:t.printData.startDate,endDate:t.printData.endDate}):Object(f.jsx)(T.a,{onBack:function(){return t.history.goBack()}})})))},360:function(t,e){function r(){return t.exports=r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,r.apply(null,arguments)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},385:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},386:function(t,e,r){var n=r(230).default,i=r(399);t.exports=function(t){var e=i(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},388:function(t,e,r){var n=r(386);function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}t.exports=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},395:function(t,e,r){"use strict";var n=r(8),i=r(0),o=r.n(i),c=r(308),l=r(2),a=Object(i.lazy)((function(){return Promise.all([r.e(2),r.e(5),r.e(6),r.e(167),r.e(182)]).then(r.bind(null,489))}));function s(t){return Object(l.jsx)(i.Suspense,{fallback:Object(l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",padding:32},children:Object(l.jsx)(c.a,{})}),children:Object(l.jsx)(a,Object(n.a)({},t))})}e.a=o.a.memo(s)},399:function(t,e,r){var n=r(230).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},403:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},407:function(t,e,r){var n=r(385);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}
1,t.exports.__esModule=!0,t.exports.default=t.exports},423:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n={TIMESHEET_TOTAL:"timesheetTotal",TIMESHEET_TABLE:"timesheetTable",TIMESHEET_PAYROLL:"timesheetPayroll",TIMESHEET_SELECTED:"timesheetSelected",JOB_TABLE:"jobTable",CHECKLIST_TABLE:"checklistTable",CHECKLIST_ALL:"checklistAll",CHECKLIST_REPORT:"checklistReport",TICKET_REPORT:"ticketReport",ORDER_SELECTED:"orderSelected",CUSTOMER_TABLE:"customerTable",RATES:"rates",GRAINS:"grains",PAYROLL:"payroll",USERS:"users",IFTA_REPORT:"iftaReport"}},467:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e,n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},487:function(t,e){t.exports=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r},t.exports.__esModule=!0,t.exports.default=t.exports},541:function(t,e,r){"use strict";r(0);var n=r(237),i=r(307),o=r(96),c=r(90),l=r.n(c),a=r(2),s=Object(n.a)((function(t){return{content:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"1000px",margin:"0 auto",padding:t.spacing(0,2)},backButton:{marginTop:t.spacing(2),marginBottom:t.spacing(2)},paper:{width:"100%",padding:t.spacing(3)},message:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"}}}));e.a=function(t){var e=s();return Object(a.jsxs)("div",{className:e.content,children:[Object(a.jsx)("div",{className:e.backButton,children:Object(a.jsx)(i.a,{variant:"contained",startIcon:Object(a.jsx)(l.a,{}),onClick:t.onBack,children:"Back"})}),Object(a.jsx)(o.a,{className:e.paper,children:Object(a.jsxs)("div",{className:e.message,children:[Object(a.jsx)("h2",{children:"No data available"}),Object(a.jsx)("p",{children:"This view was opened without data (a refresh or direct link). Please regenerate it from the report."})]})})]})}},547:function(t,e){},548:function(t,e){},549:function(t,e){},550:function(t,e){},789:function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return i}));var n=function(t){var e=Number(String(t).replace(/,/g,"").trim());return Number.isFinite(e)?e:0},i=function(t){return Array.isArray(t)?t.map(n):[]}}}]); 2//# sourceMappingURL=EquipmentIftaPrint.4440ae8d.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.