예제 #1
0
${$class_third} =& $po_detail;
?>

<?php 
if (!empty($_GET["po_header_id"])) {
    $po_header_id = htmlentities($_GET["po_header_id"]);
} elseif (!empty($_POST["po_header_id"][0])) {
    $po_header_id = $_POST["po_header_id"][0];
} else {
    $po_line = new po_line();
    $po_line_object = array();
    array_push($po_line_object, $po_line);
    //	$field_array = po_line::$field_array;
}
if (!empty($po_header_id)) {
    $po_line_object = po_line::find_by_po_headerId($po_header_id);
    //assign the item number to the object
    foreach ($po_line_object as &$po_lines) {
        if (!empty($po_lines->item_id_m)) {
            $item = item::find_by_id($po_lines->item_id_m);
            $po_lines->item_number = $item->item_number;
        }
    }
    if (count($po_line_object) == 0) {
        $po_line = new po_line();
        $po_line_object = array();
        array_push($po_line_object, $po_line);
    }
}
?>