Example #1
0
     }
     $tr = new tr($tr_no);
     if ($tr->get_errmsg()) {
         print_error($tr->get_errmsg());
         exit;
     }
     $tr_data = $tr->get_tr();
     print_object($tr_data);
     break;
 case 'deletetr':
     //check office can use this function
     if (!require_office()) {
         print_error($string_arr['er003']);
     }
     //check user permission,
     if (!check_office_staff($_SESSION['staff_no'])) {
         print_error($string_arr['er004']);
     }
     $tr = new tr($tr_no);
     if ($tr->get_errmsg()) {
         print_error($tr->get_errmsg());
         exit;
     }
     $tr_data = $tr->get_tr();
     if ($tr_data->with_po) {
         //no handle po with tr
         print_error('[!]not-in handle case (tr with po)');
     }
     $tr_delete_action = $tr->delete_tr();
     break;
 case 'viewdeleedtr':
Example #2
0
 //edit 2012-12-12
 if ($phone_qty != 0) {
     $detail_of_tr_inTable .= '<p>電話總數:' . $phone_qty . '</p>';
 }
 $button_inTable = '';
 $delete_tr_but = '';
 if ($transState_no == 1) {
     if ($_SESSION['retail_no'] == getShopno($fromshop)) {
         $button_inTable = '';
     } else {
         if ($_SESSION['retail_no'] == getShopno($toshop)) {
             $button_inTable = '<input type="button" value="收貨" onclick="recTransfer(' . $o_trNo . ')"/>';
         }
     }
     //有直接連PO的TR唔handle住, with_po = 0 等如無直接連
     if (require_office() && check_office_staff($_SESSION['staff_no']) && $row1['with_po'] == 0) {
         $delete_tr_but = '<input type="button" value="刪除轉貨單" class="finIncel"  onclick="deleteTrans(' . $o_trNo . ', this);" />';
     }
 }
 //echo $_SESSION['retail_no'];
 $numOfRow = 1;
 $printbut = '<input type="button" value="重印轉貨單" class="finIncel"  onclick="printTrans(' . $o_trNo . ');" />';
 $msgarray = array();
 $msgarray["trNo"] = $trNo;
 $msgarray["createDate"] = $createDate;
 $msgarray["createBy"] = $createBy;
 $msgarray["stateName"] = $stateName;
 $msgarray["fromshop"] = $fromshop;
 $msgarray["toshop"] = $toshop;
 $msgarray["detail_of_tr_inTable"] = $detail_of_tr_inTable;
 $msgarray["button_inTable"] = $button_inTable;