<?php if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } if (isset($_POST['area']) && isset($_POST['id'])) { $area = isset($_POST['area']) ? htmlspecialchars($_POST['area']) : ""; $id = isset($_POST['id']) ? htmlspecialchars($_POST['id']) : ""; $costarr = Worksheets::getCostGuide($id, $area); $key = array_keys($costarr); $label = getFieldLabel(); $listArr = array(); for ($i = 0; $i < count($key); $i++) { $listArr[] = array('value' => $costarr[$key[$i]], 'label' => $label[$key[$i]]); } echo json_encode($listArr); } else { echo 'not found'; } /** * Lay label cua cac chi phi * */ function getFieldLabel() { $costguide = new CostGuides(); $label = array(); foreach ($costguide->field_defs as $name => $arr) { if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) { if ($arr['vname'] != 'LBL_DELETED') { $label[$name] = translate($arr['vname'], 'CostGuides');
'<input type="text" name="sc[' + n + '][bank_name]" class="form-control" id="bank-name" placeholder="Bank Name">' + '</div>' + '<div class="form-group">' + '<label for="AccountNumber">Account Number</label>' + ' <input type="text" name="sc[' + n + '][account_no]" class="form-control" id="account-number" placeholder="Account Number">' + '</div>' + '<div class="form-group">' + '<label for="bg_issue_date"><?php echo getFieldLabel("bg_issue_date"); ?> (Only for Bank Gurantee)</label>' + '<input type="text" name="sc[' + n + '][bg_issue_date]" class="form-control bg_issue_date" placeholder="yyyy-mm-dd">' + '</div>' + '<div class="form-group">' + '<label for="bg_exp_date"><?php echo getFieldLabel("bg_exp_date"); ?> (Only for Bank Gurantee)</label>' + '<input type="text" name="sc[' + n + '][bg_exp_date]" class="form-control bg_expiry_date" placeholder="yyyy-mm-dd">' + '</div>' + '<a href="#" class="remove-box btn btn-warning"><i class="fa fa-minus"></i> Remove This Security Item!</a>' + '</div>'); box_html.hide(); $('.security_group:last').after(box_html); addDatePickerToAllBG(); box_html.fadeIn('slow'); return false; }); }); $('#update_prof').on('click', '.remove-box', function() {
</td> <td class=""><?php echo validateProfileData($profile->address); ?> </td> </tr> <tr > <td class="small-col"> <i class="<?php echo getFieldIcon("cell_no"); ?> "></i> </td> <td ><?php echo getFieldLabel("cell_no"); ?> </td> <td class=""><?php echo validateProfileData($profile->cell_no); ?> </td> </tr> </tbody> </table> </div> </div><!-- /.box-body --> <div class="box-footer">