Commodity Table for Pdfs
From UG
Contents |
Ver 4.0
Totals logic
1] Totals for multipage:
Q: In case table is split between multiple pages, do we need to print totals line on each page or only on last page?
A: Only on last page Depends on doc. See specific doc spec.
Lines manipulation
Some pdf commodity table sections have "line manipulation features":
Line Up
- Line could be selected and then moved up the list until top is reached
- At first no line is selected
- Once some line is selected system should hold selection until page is refreshed or another line is selected (not working now)
Line Down
- 1 Line could be selected and then moved down the list until bottom is reached
- 2 Some documents have no bottom (if they could be multipage, example: DO.Ocean), some have (DO.Air)
- 3 At first no line is selected
- 4 Once some line is selected system should hold selection until page is refreshed or another line is selected
Insert Line
- 1 user selects line, clicks "Insert"
- 2 system must insert line above selected
- 3 system must keep selected line selected even after insert - this is more convenient if user wants to insert several lines at a time
- 4 what is the Insert logic for fixed lines document (like HAWB)?
- option1) no Insert button
- option2) insert up to max# of lines and then display warning pop-up
Delete line
- 1 User can select line and click "Delete". System would delete selected line and move all lines below one line up.
- 2 As usual keep selected line selected
Precision
- must be exactly 2 digits after dot (on all docs) --Alex 20:41, 26 June 2009 (UTC)
Unit conversion
- most tables have unit conversion feature that must convert on the fly (example: kg to lb)
Look and Feel
- 1] unit of measurement that appears to the right of the number (example: 20CBM) must be printed on every line
- 2] comtable needs vertical lines but not horizontal lines
- 3] comtable needs lines around it - it must be "in the box"
- 4] commod table must always extend down to the next section or the bottom of the page regardless of how many lines are there (now none of the docs seems to have that)
- 5] all totals in TOC (Table Of Charges) must be bold
Version 5.0 Textarea based
Main functions and what is common
- Pull function - pull info into template from DB (two separate logics: one for air docs and one for ocean docs; also HAWB and MAWB are special)
- Manipulate function - manipulate table on template (common for all pdfs)
- Create pdf function - create pdf based on template (common for all pdfs)
Pull function for all
Depending on the doc and case there would be a number of "lines" (textboxes/textareas) pre-filled appear on the template. Old logic is to always create 8 lines. The new logic is to show as many "lines" as required (containing data). Do not create any empty additional lines. User will add new lines at will.
Pull function for AIR
Air CT Delivery Order
- this could be multipage
- use pull logic described in Air CT Delivery Order
Air CT Arrival Notice
Keep as is
HAWB
- this doc is always one page doc. Create 6 "lines" always as usual
- pre-fill logic as before
Air M MAWBL
- this doc is always one page doc. Create 6 "lines" always as usual
- pre-fill logic as before
Air M Manifest
keep as is
Pull function for OCEAN
- all docs can be multipage
Ocean CT ArrivalNotice
leave as is
Ocean CT Dock Receipt
- pull logic is defined in Delivery Order for Ocean CT
Delivery Order for Ocean CT
- pull logic is defined in Delivery Order for Ocean CT
Ocean CT Freight Release
- pull logic is defined in Delivery Order for Ocean CT
House Bill of Lading
- pull logic is defined in Delivery Order for Ocean CT
Ocean M MBL
- pull logic is defined in Delivery Order for Ocean CT
- note: this is basically "FCL case" always
Ocean M Cargo Manifest
- leave as is
Manipulate function
Line manipulation : Up, Down, Insert, Delete, Clear
- Clear is added functionality in this version. See other specs in previous version.
Clear clears all contents in the selected line(s)
- Another change in this version is that it is possible to choose multiple lines
Unit conversion
- See previous version.
Create pdf function
TBD
Version 5.0.b First Page Fixed Size Design
For some documents we would like to define the following logic.
Apply this logic to:
- DO Air, DO Ocean
- HBL, MBL
Requirements
- Documents affected are documents that may have more than 1 page.
- First page must always have a fixed layout in terms of all lines and sections including commodity table lines and sections like where totals are. (This is how it is in HAWB now!)
- If system "see" (or user decide) that there are too much info for commodity table to fit on page one then system prints (or gives user choice) to print all data on page 2, 3, ... (can print as it does for DO AIR now with totals appearing right after last line). But on the 1st page: totals would print and in "Description" column it would say "See attached pages"
- Each additional page would have a simple header and simple or no footer
Design
- Option 1: have a "Multipage mode" checkbox on a template. If selected then system would print as defined above
- Option 2: have system detect automatically that more than one page is needed and would print as defined above
This solution was implemented:
solution B) Use this code:
JasperPrint jp1 = generateMainDocumentCopy("Original"); Integer pagesCount = jp1.getPages().size();
in this solution:
- provide "Fix 1 page doc" checkbox on template
- user would generate doc and if he sees that 1 page doc has been generated and commod table is not tall enough the he would Check
- system would take template+data and add good number of empty lines and generate report and see that "pagesCount" (see code above) is >1. Then it would decrease numb of lines added to the exact number required to generate 1 page doc with optimal # lines inserted to have this commod table tall as tall as possible without overflow to next page (ispol'zuite skagem metod deleniya otrezka popolam)
Next Ver and RFC
- Must be able to distinguish between different types of pkg (ex: drums vs cartons)