Reports are a good way to study/explore data or to send to customers. Or can be tied to a portal company to be sent to customers in their specific format.
You can generate reports in the following link: shipx.cc/reports
Currently, reports are limited to the following data/Model types. Aggregation across models are currently not built.
- Bookings
- Cost Items
- Jobs
- Transport Jobs (all legs)
- Vouchers
- VoucherItems
Permission
Each report can be categorized into three categories, which would limit the users can view them. You'll need to set the report to the associated categories. They are operations, management and finance. Once set, you'll need to give the associated roles the correct permission under report:viewOperation/viewFinance/viewManagement.
Columns
Columns the fields inside each model type. Once you select the Model Type, you can add any field to that column. Each column number would be associated to the column in the exported CSV. Below are an examples which you can generate for Transport Jobs.
Special Helper functions can be used to help decorate the associated fields:
- Key - would be the field you want the value to be displayed,
- Header - the label on the top of the column.
- Format - a helper function to assist in formatting. You can select
- dev
- DateFormat - you can specify different formats:
- The first parameter should be the format type. The system uses MomentJS transformation as follows:
- YYYY 2014 4 or 2 digit year. Note: Only 4 digit can be parsed on strict mode
- YY 14 2 digit year
- Y -25 Year with any number of digits and sign
- Q 1..4 Quarter of year. Sets month to first month in quarter.
- M MM 1..12 Month number
- MMM MMMM Jan..December Month name in locale set by moment.locale()
- D DD 1..31 Day of month
- Do 1st..31st Day of month with ordinal
- DDD DDDD 1..365 Day of year
- X 1410715640.579 Unix timestamp
- x 1410715640579 Unix ms timestamp
- The second parameter should be the timezone which should follow:
- For example: Asia/Kuala_Lumpur
- The entire list can be found here: https://gist.github.com/diogocapela/12c6617fc87607d11fd62d2a4f42b02a
- The first parameter should be the format type. The system uses MomentJS transformation as follows:
- DateDiff - subtracts two dates, if you use this, you'll need to add three values to the formatValues field. firstDate, secondDate and unitOfTime
- milliseconds, seconds, minutes, hours, days, weeks, months and years. Please these are absolute differences and does not take into account different customizations such as midnight cut-off. Those may require additional custom
Special notes
There are two special columns called bookingDetails and jobDetails which are used to store data specified in BookingType and JobType. To access data in this, you'll need specify the key in the formatValues such as "references" or "uom". If the fields are objects, it will try JSON.stringify the value. If it's an array, it will comma separate the values in the array.