$pack_options .= '<option value="D=' . $pid . '">' . $pcode . '</option>';
     }
     $pack_options .= '</select>';
     //$pack_options .= ' <input type="button" class="packopt-add" value="+" title="Add to Logistic Package" />';
     $pack_options_btn_add_enabled = ' <input type="button" class="packopt-add" value="+" title="Add to Logistic Package" />';
     $pack_options_btn_add_disabled = ' <input type="button" value="+" disabled="disabled" />' . '<span class="ui-icon ui-icon-info help" style="float:right;" ' . 'title="Add to Logistic Package button is disabled, since this package already set as sent"></span>';
     //$form .= '<div style="text-align:right;border-bottom:1px dotted #ccc;">'.$pack_options.'</div>';
     $list_of_new_packages = '<div style="text-align:right;border-bottom:1px dotted #ccc;">' . $pack_options . $pack_options_btn_add_enabled . '</div>';
 }
 //EXCLUDE FROM PACKAGE FORM (ONLY AVAILABLE AS LONG AS PACKAGE NOT YET SET AS SENT)
 $x_form = '<br/><div>';
 $x_form .= '<div class="sop-box ui-corner-all smallText"><strong>To exclude product from package and set status as complete:' . '</strong><br/>- Scan order barcode on input text below "or"' . '<br/>- Type order barcode and then click Exclude button';
 $x_form .= '<br/><br/><input type="text" id="bcidexfrompack" title="Input order barcode here" onfocus="$(this).val(\'\');" />';
 $x_form .= '&nbsp;&nbsp;<input type="button" id="exfrompack" class="button red" value="Exclude" /></div>';
 $x_form .= '</div>';
 $po_list = $class_ml->retrievePackages($logistic_id, true);
 if (count($po_list) == 0) {
     $form .= '<div class="notice">No Package Added</div>';
     $form .= $x_form;
 } else {
     $show_setsent_btn = false;
     foreach ($po_list as $type => $ps) {
         foreach ($ps as $p) {
             if (is_null($p['sent_date']) || $p['sent_date'] == '0000-00-00 00:00:00') {
                 $show_setsent_btn = true;
             }
             $del_feature = '&bull;&nbsp;';
             if ($show_setsent_btn) {
                 //DELETE PACKAGE COULD ACCESSED ONLY WHEN PACKAGES NOT YET SET AS SENT
                 $del = $show_setsent_btn ? '<input type="button" value="X" class="packopt-rem" />' : '&bull;';
                 $id = '<input type="hidden" name="package_id" value="' . $type . '=' . $p['packages_id'] . '" />';