<?php

switch($_REQUEST[mode]) {
case "batal":
    $ssql="select a.ftap_no,b.ftpurchase_inv_no
            from txap_hdr a,
                    txap_det b
            where a.ftap_no=b.ftap_no and
                     a.fnstatus<>9
              and b.ftpurchase_inv_no='{$_REQUEST['ftpurchase_invoice_no']}'";

    $rs=mysql_query($ssql);
    $str="No. Transaksi Penerimaan Hutang ini harus dibatal kan dahulu :";
    while($r=mysql_fetch_assoc($rs)) {
        $str.=$r['ftap_no'];
    }

     if(RetRstField($ssql)) {
           echo "<script>
                alert('$str');
                window.history.back();
            </script>";
            die("");
     }

      break;

}

 function CancelData() {

    global $objAxpDB;
     $strSQL=array();
    switch($_REQUEST[mode]) {
    case "batal":
        break;
    }

     return $strSQL;
 }    