<?php
	$strAutoNumber0="
	var gContainer=window.opener;              
		document.getElementById('ftoumdetail_code').value=gContainer.document.getElementById('ftuom_code_grid0').value;
	";
	// $objAxpDB->FormJS(BOMCalculation(_N_));
    $objAxpDB->FormName("Bom Calculation");
    $objAxpDB->FormSQL("select ftbom_type,ftitem_code from tlbom_header");
    $objAxpDB->FormCaption("Jenis Barang,Kode / Nama Barang");
    $objAxpDB->FormPosition("HD,HD");

    $objAxpDB->GridSQL(0, "SELECT fnindex,fnqty,ftoumdetail_code, ffqty_2,fnqty_1,ftuomdetail_multi_code,fnqty_3,ffqty_2  FROM tlbom_detail");
    // $objAxpDB->GridCaption(0,"No.,Kode Barang, Nama Barang, Satuan" );
	$objAxpDB->GridSize(0, " , ,15, , ,15, ,");
	$objAxpDB->Lookup('ftuomdetail_multi_code', 'SELECT ftuom_code, ftuom_name FROM vi_uom_code_multi', 'ftuom_code', 'ftuom_name', -1,true);
	$objAxpDB->GridLayout(0,3,"&nbsp;<LABEL ACCESSKEY=P>/</LABEL>");
	// $objAxpDB->GridLayout(0,3,"<input type='hidden' id='hd_includeD0_N_' name='hd_includeD0[]' value='1'> <input type='checkbox'  id='chk_includeD0_N_' name='chk_includeD0[]' onclick='valInclude(_N_);'>");

    $ajax2=" onclick=\"BOMQtyMulti1(_N_);\";";
	$objAxpDB->GridLayout(0,7,"<input type='button' id='cmd_grid_list' name='cmd_grid_list' value='Submit' {$ajax2}>");
    $ajax1="   onChange=\"BOMQtyMulti(_N_);\"  ";
    $objAxpDB->GridScript(0,4, $ajax1);
    $objAxpDB->SetStatus("id, fnstatus");
    if ($objAxpDB->GetStatus("id") == "")
            $objAxpDB->ButtonShow("baru, cetak_daftar, export_excel ,  tutup");
    elseif ($objAxpDB->GetStatus("id") == 0) {
            $objAxpDB->FormLocked("0,0,0,1,0,0,1");
            $objAxpDB->ButtonShow("tutup");
            $objAxpDB->GridLocked(0, "1,0,1,0,0,0,1");
            $objAxpDB->GridHidden(0, "1,0,0,0,0,1,0");

    } elseif ($objAxpDB->GetStatus("fnstatus") == 1) {
            $objAxpDB->FormLocked("1,1,1,1,1,1,1,1");
            $objAxpDB->ButtonShow("tutup");
            $objAxpDB->GridLocked(0, "1,1,1,1,1,1,1,1,1,1");
            $objAxpDB->ButtonShow("tutup");
    } 	

    $objAxpDB->Process();
    $objAxpDB->WriteHtmlTable();

?>
