Hello there I am a newbie to Sugar but have been asked to help solve some problems in a module that has been written to handle rentals.
We are using Sugar Version 4.5.0 (Build 1124)
Unfortunateley because of the way the module has been written (some changes to core files) we can not update sugar versions for the moment.
However before tacklig that we have an urgent need to fix some bugs in the module.
We have a table display that is taken from a table called rentals.
The following are the listviewdefs that govern this
All these columns/fields show up in the listview produced table.PHP Code:$listViewDefs['Availability'] = array(
'TITLE_EN' => array(
'module' => 'Rentals',
'width' => '20',
'label' => 'LBL_LIST_RENTAL_TITLE_EN',
'link' => true,
'default' => true,
'ACLTag' => 'AVAILABILITY'),
'PRICE' => array(
'width' => '15',
'label' => 'LBL_LIST_RENTAL_PRICE',
'default' => true),
'AVAILABILITY' => array(
'width' => '20',
'label' => 'LBL_LIST_AVAILABILITY',
'default' => false,
'sortable' => false),
'RENT_AVAILABILITY_STATUS' => array(
'width' => '20',
'label' => 'LBL_LIST_AVAILABILITY',
'default' => true,
'sortable' => true),
'REFERENCE' => array(
'width' => '20',
'label' => 'LBL_LIST_RENTAL_REFERENCE',
'default' => true),
'RENT_TYPE' => array(
'width' => '10',
'label' => 'LBL_LIST_RENTAL_TYPE',
'default' => true),
'AVAILABILITY_STARTING_DATE' => array(
'width' => '20',
'label' => 'LBL_LIST_AVAILABILITY_STARTIN_FROM',
'link' => false,
'default' => true),
/*'AVAILABILITY_ENDING_DATE' => array(
'width' => '20',
'label' => 'LBL_LIST_AVAILABILITY_ENDING_ON',
'link' => false,
'default' => true), */
'RENTAL_CATEGORY' => array(
'width' => '10',
'label' => 'LBL_LIST_RENTAL_CATEGORY',
'default' => false),
'SCHEDULER_1' => array(
'width' => '10',
'label' => ' ',
'default' => true,
'sortable' => false),
However wheen I add
to the listviewdefsPHP Code:'CONTRACT_ENDING' =>
array ('module' => 'Rentals',
'name' => 'check_end_date',
'label' => 'LBL_CONTRACT_ENDING',
'dbType' => 'varchar',
'len' => '50',
'comment' => 'Availability',
'width' => '120',
'link' => false,
'sortable' => false,
'default' => true),
and modify the modules listview.php as followsI get the Contract Ending as a header, but no values in the table. If, on the other hand I put in an echo of check_end_date I can get that printed out on scree.PHP Code:$focus->availability_starting_date=$_REQUEST['availability_starting_date'];
$focus->availability_ending_date=$_REQUEST['availability_ending_date'];
$focus->check_end_date=$_REQUEST['check_end_date'];
$title_en=$_REQUEST['title_en'];
$reference=$_REQUEST['reference'];
$rent_postal_code=$_REQUEST['rent_postal_code'];
$rent_rate_rent=$_REQUEST['rent_rate_rent'];
$rent_type=$_REQUEST['rent_type'];
$rent_floors=$_REQUEST['rent_floors'];
$rent_beds=$_REQUEST['rent_beds'];
$rent_baths=$_REQUEST['rent_baths'];
$rental_category=$_REQUEST['rental_category'];
$rent_status=$_REQUEST['rent_status'];
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_TITLE'], true);
echo "\n</p>\n";
$seedAvailability = new Availability();
$xtpl=new XTemplate ('modules/Availability/SearchForm.html');
$xtpl->assign("TITLE_EN", $title_en);
$xtpl->assign("REFERENCE", $reference);
$xtpl->assign("RENT_POSTAL_CODE_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rent_postal_code_search_dom'], $rent_postal_code));
$xtpl->assign("RENT_RATE_RENT", $rent_rate_rent);
$xtpl->assign("RENT_TYPE_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rent_type_search_dom'], $rent_type));
$xtpl->assign("RENT_FLOORS_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rent_floors_search_dom'], $rent_floors));
$xtpl->assign("RENT_BEDS_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rent_beds_search_dom'], $rent_beds));
$xtpl->assign("RENTAL_BATHS_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rent_bath_search_dom'], $rent_baths));
$xtpl->assign("RENTAL_CATEGORY_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rental_category_search_dom'], $rental_category));
$xtpl->assign("RENT_STATUS_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rent_status_search_dom'], $rent_status));
$xtpl->assign("CALENDAR_LANG", "en");
$xtpl->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("CONTRACT_STARTING", $_REQUEST['contract_starting']);
$xtpl->assign("CONTRACT_ENDING",$focus->check_end_date);
$xtpl->assign("AVAILABILITY_STARTING_DATE", $focus->availability_starting_date);
$xtpl->assign("AVAILABILITY_ENDING_DATE", $focus->availability_ending_date);
$xtpl->assign("VIEW", $focus->view);
$xtpl->assign("SEARCH_ID", 2);
$xtpl->assign('SEARCH_ACTION', 'ListView');
$xtpl->assign("AVAILABILITY_2_OPTIONS", get_select_options_with_id($app_list_strings['availability_2_dom'], $_REQUEST['availability_2']));
$xtpl->assign("RENT_AVAILABILITY_STATUS_SEARCH_OPTIONS", get_select_options_with_id($app_list_strings['rent_availability_status_search_dom'], $_REQUEST['rent_availability_status']));
$xtpl->parse("main");
$xtpl->out("main");
What am I doing wrong?
I have cleared the cache folder files, but that makes no difference.
Thanks to anyone who can help
Best,
Rob


LinkBack URL
About LinkBacks




Reply With Quote

Bookmarks