Region Type: PL/SQL Dynamic Content
PL/SQL Code :
declare
begin
FOR X IN (select CAPACITY_CBM, ALLOCATION, CONTAINER_MODE, TOTAL_ADDED,CONTAINER_NUMBER, CONTAINER_SEAL, TARE_WEIGHT, ID
from STUFFING_PLAN_CONT where STUFFING_PLAN_MST_ID = :P124_ID)
LOOP
htp.p(
'<div style ="margin-top :10px " >'||'Container Capacity : '||X.CAPACITY_CBM||' ('||X.ALLOCATION||')'|| '</div>
<div >'||'Container Mode : '||X.CONTAINER_MODE|| '</div>
<div >'||'Container Number/Seal : '||X.CONTAINER_NUMBER||' / '||X.CONTAINER_SEAL|| '</div>
<div >'||'Tare weight : '||X.TARE_WEIGHT|| '</div>
<div>'||'Total Added : '||X.TOTAL_ADDED|| '</div>
<a href="'||apex_util.prepare_url('f?p='||:APP_ID||':'||127||':'||:APP_SESSION||'::::P127_ID:'||X.ID) || '" ">
<input type="button1" class="button button1" class="t-Icon t-Icon--right fa fa-print" id="print" type="button" onclick="printdiv(''div_print1'');" value="Edit"/> </a>
');
htp.p('<table width="100%" style="border: 1px solid #ccc; background-color: #dddddd;font-size:12px; " >
<tr>
<th width="11%" style="text-align:center">Booking ID</th>
<th width="11%" style="text-align:center">Shipper</th>
<th width="10%" style="text-align:center">Buyer</th>
<th width="5%" style="text-align:center">CTN Total</th>
<th width="5%" style="text-align:center">CTN Allocated</th>
<th width="5%" style="text-align:center">CTM Remain</th>
<th width="5%" style="text-align:center">CBM Total</th>
<th width="5%" style="text-align:center">CBM Allocated</th>
<th width="5%" style="text-align:center">CBM Remain</th>
<th width="5%" style="text-align:center">GW Total</th>
<th width="5%" style="text-align:center">GW Allocated</th>
<th width="5%" style="text-align:center">GW Remain</th>
</tr>
</tr>
</tr>
</tr>
</table>');
FOR Y IN (select GET_SEABOOKING_DTL('A',SEAEXPORT_MST_ID) BOOKING_ID,
get_party_name_add ('N',SETUP_PARTY_COM_ID) Shipper,
get_party_name_add('N',BUYER_ID) Buyer,
CTN_TOTAL,CTN_ALLOCATED, CTN_REMAIN, CBM_TOTAL,
CBM_ALLOCATED,CBM_REMAIN, GW_TOTAL,GW_ALLOCATED,GW_REMAIN, LOCATION
from STUFFING_PLAN_GOODS where STUFFING_PLAN_CONT_ID =X.ID)
LOOP
htp.p('<style > .tableStyle
table tr td{
border: 1px solid #ccc;
border-collapse: collapse;
margin-bottom: 10px;
}
</style>');
htp.p('<div class ="tableStyle" >');
htp.p('<table width="100%" cellspacing="0" >
<td width="10%" style="text-align:left;font-size:12px;"><b>'||Y.BOOKING_ID||'</font></td>
<td width="10%" style="text-align:left;font-size:12px;"><b>'||Y.Shipper||'</font></td>
<td width="10%" style="text-align:left;font-size:12px;"><b>'||Y.Buyer||'</font></td>
<td width="5%" style="text-align:left;font-size:12px;"><b>'||Y.CTN_TOTAL||'</font></td>
<td width="5%" style="text-align:center;font-size:12px; ">'||Y.CTN_ALLOCATED||'</font></td>
<td width="5%" style="text-align:center;font-size:12px; ">'||Y.CTN_REMAIN||'</font></td>
<td width="5%" style="text-align:right;font-size:12px; ">'||Y.CBM_TOTAL||'</font></td>
<td width="5%" style="text-align:right;font-size:12px; ">'||Y.CBM_ALLOCATED||'</font></td>
<td width="5%" style="text-align:right;font-size:12px; ">'||Y.CBM_REMAIN||'</font></td>
<td width="5%" style="text-align:right;font-size:12px; ">'||Y.GW_TOTAL||'</font></td>
<td width="5%" style="text-align:right;font-size:12px; ">'||Y.GW_ALLOCATED||'</font></td>
<td width="5%" style="text-align:right;font-size:12px; ">'||Y.GW_REMAIN||'</font></td>
</tr>
</table>')
;
END LOOP;
END LOOP;
end;