retrieve($_REQUEST['record']); $file = 'modules/EcmGroupSales/EcmGroupSale.php'; if(file_exists($file)) { $cc = array(); require_once($file); $cc = EcmGroupSale::loadSettings(); } $OPT = array(); $OPT['row_item_height'] = $cc['row_item_height']; $OPT['row_item_height_selected'] = $cc['row_item_height_selected']; $OPT['rows_on_item_list'] = $cc['rows_on_item_list']; $OPT['position_table_height'] = $OPT['row_item_height']*$OPT['rows_on_item_list']+40+$OPT['rows_on_item_list']*4; $OPT['quick_product_item_adding'] = $cc['quick_product_item_adding']; global $app_list_strings; $focus->position_list = str_replace('"','\"',$focus->getPositionListDetailView()); require_once('include/MVC/View/SugarView.php'); require_once('modules/EcmPrepaymentInvoices/views/DetailView/view.detail.php'); $detail = new EcmPrepaymentInvoicesViewDetail(); $detail->ss = new Sugar_Smarty(); $detail->module = 'EcmPrepaymentInvoices'; $detail->bean = $focus; $detail->tplFile = 'include/DetailView/DetailView.tpl'; $detail->ss->assign("POSITION_LIST", $focus->position_list); //get other prepaymentinvoices info $res = $GLOBALS['db']->query("SELECT id, document_no, inv_value FROM ecmprepaymentinvoices WHERE ecmsale_id='".$focus->ecmsale_id."'"); $total = 0; $other_inv = ''; while ($row = $GLOBALS['db']->fetchByAssoc($res)) { if ($row['id']==$focus->id) continue; $other_inv.=''.$row['document_no'].' '; $total+=$row['inv_value']; } $detail->ss->assign('other_ecmprepaymentinvoices',$other_inv); $detail->ss->assign('other_ecmprepayment_invoices_sum',$total); $scriptOpt = ''; echo $scriptOpt; $detail->preDisplay(); echo $detail->display(); ?>