public function __construct()
 {
     parent::__construct();
     self::set_active_menu('import');
     set_time_limit(10000);
     //Set the time limit for this request oto 3000 seconds
 }
 public function __construct()
 {
     parent::__construct();
     //self::set_active_menu('admin::rental::contract_type_list');
     self::set_active_menu('rental::contracts::price_item_list');
     $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . lang('price_list');
 }
 public function __construct()
 {
     $this->get_pdf_templates();
     parent::__construct();
     self::set_active_menu('rental::contracts');
     $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . lang('contracts');
 }
 public function __construct()
 {
     parent::__construct();
     self::set_active_menu('rental::contracts::invoice');
     $config = CreateObject('phpgwapi.config', 'rental');
     $config->read();
     $billing_time_limit = isset($config->config_data['billing_time_limit']) && $config->config_data['billing_time_limit'] ? (int) $config->config_data['billing_time_limit'] : 500;
     set_time_limit($billing_time_limit);
     // Set time limit
     $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . lang('invoice_menu');
 }
 public function query()
 {
     // TODO: access control
     $type_id = phpgw::get_var('type_id');
     $composite_id = phpgw::get_var('composite_id');
     $search_type = phpgw::get_var('search_option');
     // YUI variables for paging and sorting
     $start_index = phpgw::get_var('startIndex', 'int');
     $num_of_objects = phpgw::get_var('results', 'int', 'GET', 10);
     $sort_field = phpgw::get_var('sort');
     $sort_ascending = phpgw::get_var('dir') == 'desc' ? false : true;
     $property_bolocation = new property_bolocation();
     $property_bolocation->order = $sort_field;
     $property_bolocation->sort = phpgw::get_var('dir');
     $property_bolocation->start = $start_index;
     if ($search_type == 'gab') {
         $q = phpgw::get_var('query');
         $query = explode('/', $q);
         //GAB search
         $property_sogab = new property_sogab();
         $gabinfo = $property_sogab->read(array('gaards_nr' => empty($query[0]) ? '' : $query[0], 'bruksnr' => empty($query[1]) ? '' : $query[1], 'feste_nr' => empty($query[2]) ? '' : $query[2], 'seksjons_nr' => empty($query[3]) ? '' : $query[3], 'allrows' => true));
         //var_dump($gabinfo);
         foreach ($gabinfo as $gabelement) {
             $row = $property_bolocation->read_single($gabelement['location_code']);
             $row['gab'] = rental_uicommon::get_nicely_formatted_gab_id($gabelement['gab_id']);
             $rows[] = $row;
             $rows_total[] = $row;
             //TODO: Add gabno for element
         }
     } else {
         if (!isset($type_id) || $type_id < 1) {
             $type_id = 2;
         }
         $user_rows_per_page = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
         $tmp_count = phpgw::get_var('results', 'int', 'GET', 0);
         if (isset($tmp_count) && $tmp_count > 0) {
             $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] = $num_of_objects;
         }
         $rows_total = $property_bolocation->read(array('type_id' => $type_id, 'allrows' => true));
         $rows = $property_bolocation->read(array('type_id' => $type_id));
         $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] = $user_rows_per_page;
     }
     //Add context menu columns (actions and labels)
     array_walk($rows, array($this, 'add_actions'), array($composite_id, $type_id));
     //Build a YUI result from the data
     //
     $result_data = array('results' => $rows, 'total_records' => count($rows_total));
     return $this->yui_results($result_data, 'total_records', 'results');
 }
Exemple #6
0
			element.innerHTML ='<p class="error"><?php 
echo lang('messages_fontpage_not_saved');
?>
</p>';
		}

	}

	new YAHOO.widget.Button('saveSetup',{onclick: {fn:savePanelConfigurations, scope: panels}});
	new YAHOO.widget.Button('resetSetup',{onclick: {fn:resetPanelConfigurations, scope: panels}});
});

</script>
<?php 
echo rental_uicommon::get_page_error($error);
echo rental_uicommon::get_page_message(phpgw::get_var('message'));
?>

<h1><img src="<?php 
echo RENTAL_TEMPLATE_PATH;
?>
images/32x32/places/user-desktop.png" /> <?php 
echo lang('dashboard_title');
?>
</h1>



<fieldset>
	<h3><?php 
echo lang('panels');
			key: "labels",
			hidden: true
		},
		{
			key: "actions",
			hidden: true
		}];

	<?php 
if ($extra_cols) {
    echo rental_uicommon::get_extra_column_defs('columnDefs', $extra_cols);
}
?>
	<?php 
if ($editors) {
    echo rental_uicommon::get_column_editors('columnDefs', $editors);
}
?>

	// Initiating the data source
	setDataSource(
		'index.php?menuaction=rental.uiprice_item.query&amp;phpgw_return_as=json<?php 
echo $url_add_on;
?>
&amp;editable=<?php 
echo $editable ? "true" : "false";
?>
',
		columnDefs,
		'',
		[],
<?php

echo rental_uicommon::get_page_error($error);
 function populate(int $composite_id, &$composite)
 {
     if ($composite == null) {
         $composite = new rental_composite($composite_id);
         $composite->set_description($this->unmarshal($this->db->f('description', true), 'string'));
         $composite->set_is_active($this->db->f('is_active'));
         $composite_name = $this->unmarshal($this->db->f('name', true), 'string');
         if ($composite_name == null || $composite_name == '') {
             $composite_name = lang('no_name_composite', $composite_id);
         }
         $composite->set_name($composite_name);
         $composite->set_has_custom_address($this->unmarshal($this->db->f('has_custom_address', true), 'bool'));
         $composite->set_custom_address_1($this->unmarshal($this->db->f('address_1', true), 'string'));
         $composite->set_custom_address_2($this->unmarshal($this->db->f('address_2', true), 'string'));
         $composite->set_custom_house_number($this->unmarshal($this->db->f('house_number', true), 'string'));
         $composite->set_custom_postcode($this->unmarshal($this->db->f('postcode', true), 'string'));
         $composite->set_custom_place($this->unmarshal($this->db->f('place', true), 'string'));
         $composite->set_area($this->unmarshal($this->db->f('area', true), 'float'));
         $composite->set_furnish_type_id($this->unmarshal($this->db->f('furnish_type_id'), 'int'));
         $composite->set_standard_id($this->unmarshal($this->db->f('standard_id'), 'int'));
     }
     // Location code
     $location_code = $this->unmarshal($this->db->f('location_code', true), 'string');
     //Status
     $database_status = $this->unmarshal($this->db->f('status', true), 'string');
     $composite_status = $composite->get_status();
     if ($composite_status != 'Ikke ledig') {
         $composite->set_status($database_status);
     }
     $contract_id = $this->unmarshal($this->db->f('contract_id', true), 'int');
     // Adds contract to array in composite object if it's not already added
     if ($contract_id != 0 & !$composite->contains_contract($contract_id)) {
         $contract = new rental_contract($contract_id);
         $start_date = $this->unmarshal($this->db->f('date_start', true), 'int');
         $end_date = $this->unmarshal($this->db->f('date_end', true), 'int');
         $old_contract_id = $this->unmarshal($this->db->f('old_contract_id', true), 'string');
         // Adds contract if end date is not specified or greater than todays date
         if ($end_date == 0 || $end_date > time()) {
             $contract_date = new rental_contract_date($start_date, $end_date);
             $contract->set_contract_date($contract_date);
             $contract->set_old_contract_id($old_contract_id);
             $composite->add_contract($contract);
         }
     }
     if (!$composite->contains_unit($location_code)) {
         //composite inneholder ikke unit -> legg den til
         $location = null;
         try {
             // We get the data from the property module
             $data = @execMethod('property.bolocation.read_single', array('location_code' => $location_code, 'extra' => array('view' => true)));
             if ($data != null) {
                 $level = -1;
                 $names = array();
                 $levelFound = false;
                 for ($i = 1; $i < 6; $i++) {
                     $loc_name = 'loc' . $i . '_name';
                     if (array_key_exists($loc_name, $data)) {
                         $level = $i;
                         $names[$level] = $data[$loc_name];
                     }
                 }
                 $gab_id = '';
                 $gabinfos = @execMethod('property.sogab.read', array('location_code' => $location_code, 'allrows' => true));
                 if ($gabinfos != null && is_array($gabinfos) && count($gabinfos) == 1) {
                     $gabinfo = array_shift($gabinfos);
                     $gab_id = $gabinfo['gab_id'];
                 }
                 $location = new rental_property_location($location_code, rental_uicommon::get_nicely_formatted_gab_id($gab_id), $level, $names);
                 if (isset($data['street_name']) && $data['street_name']) {
                     $location->set_address_1($data['street_name'] . ' ' . $data['street_number']);
                 }
                 //$location->set_address_1($data['address']);
                 foreach ($data['attributes'] as $attributes) {
                     switch ($attributes['column_name']) {
                         case 'area_gross':
                             $location->set_area_gros($attributes['value']);
                             break;
                         case 'area_net':
                             $location->set_area_net($attributes['value']);
                             break;
                     }
                 }
             } else {
                 $location = new rental_property_location($location_code, null, 1, array());
             }
         } catch (Exception $e) {
             $location = new rental_property_location($location_code, null, 1, array());
         }
         $composite->add_unit(new rental_unit($this->unmarshal($this->db->f('unit_id', true), 'int'), $composite_id, $location));
     }
     return $composite;
 }
<?php

include "common.php";
?>

<?php 
echo rental_uicommon::get_page_error($error);
echo rental_uicommon::get_page_message($message);
?>

<h1><img src="<?php 
echo RENTAL_TEMPLATE_PATH;
?>
images/32x32/x-office-address-book.png" /> <?php 
echo lang('sync_parties_identifier');
?>
</h1>

<?php 
$list_form = true;
$list_id = 'sync_parties_identifier';
$url_add_on = '&amp;type=sync_parties_identifier';
$extra_cols = array(array("key" => "service_id", "label" => lang('service_id'), "index" => 3), array("key" => "responsibility_id", "label" => lang('responsibility_id'), "index" => 4), array("key" => "identifier", "label" => lang('identifier'), "index" => 5), array("key" => "sync_message", "label" => lang('sync_message'), "index" => 6), array("key" => "org_unit_name", "label" => lang('org_unit_name'), "index" => 7));
include 'party_list_partial.php';
 public function __construct()
 {
     parent::__construct();
     self::set_active_menu('rental::delegates');
     $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . lang('delegates');
 }
				<?php 
    ?>
			<?php 
} else {
    echo lang($price_item->get_price_types($current_price_type_id));
}
?>
		</dd>

		<dt>
			<label for="price"><?php 
echo lang('price');
?>
</label>
			<?php 
echo rental_uicommon::get_field_error($price_item, 'price');
?>
		</dt>
		<dd>
			<?php 
if ($editable) {
    echo '<input type="text" name="price" id="price" value="' . $price_item->get_price() . '"/>';
} else {
    echo $price_item->get_price();
}
?>
		</dd>
		<dt>
			<label for="is_inactive"><?php 
echo lang('is_inactive');
?>
Exemple #13
0
        ?>
"/> -->
					<fieldset>

								<label for="calendarNotificationDate"><?php 
        echo lang('date');
        ?>
</label>
								<!--<input type="text" name="date_notification" id="date_notification" size="10" value="<?php 
        echo isset($notification) ? htmlentities($notification->get_date()) : '';
        ?>
" /> -->
								<?php 
        //								echo $GLOBALS['phpgw']->yuical->add_listener('date_notification', $notification_date);
        echo $GLOBALS['phpgw']->jqcal->add_listener('date_notification', 'date', $notification_date);
        echo rental_uicommon::get_field_error($notification, 'date');
        ?>
									<label for="notification_recurrence"><?php 
        echo lang('recurrence');
        ?>
</label>
								<select name="notification_recurrence" id="notification_recurrence">
									<option <?php 
        echo isset($notification) && $notification->get_recurrence() == rental_notification::RECURRENCE_NEVER ? 'selected="selected"' : '';
        ?>
value="<?php 
        echo rental_notification::RECURRENCE_NEVER;
        ?>
"><?php 
        echo lang('never');
        ?>
 public function __construct()
 {
     parent::__construct();
     self::set_active_menu('rental');
 }
 public function __construct()
 {
     parent::__construct();
     self::set_active_menu('rental::contracts::adjustment');
     $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . lang('adjustment');
 }
 public static function process_rental_unauthorized_exceptions()
 {
     self::$old_exception_handler = set_exception_handler(array(__CLASS__, 'handle_rental_unauthorized_exception'));
 }
 public function __construct()
 {
     parent::__construct();
 }
	<input type="submit" name="next" value="<?php 
echo lang('bill2');
?>
"/>
</div>

<div id="user_messages">
	<h3>Meldinger</h3>
	<?php 
echo rental_uicommon::get_page_error($errorMsgs);
?>
	<?php 
echo rental_uicommon::get_page_warning($warningMsgs);
?>
	<?php 
echo rental_uicommon::get_page_message($infoMsgs);
?>
</div>

<div id="list_navigation">
	<h3>Kontrakter i kjøring</h3>
	<ul>
		<li><a href="#non_cycle"><?php 
echo lang('contracts_out_of_cycle');
?>
 (<?php 
echo count($irregular_contracts);
?>
)</a></li>
		<li><a href="#one_time"><?php 
echo lang('contracts_with_one_time');
 protected function populate(int $unit_id, &$unit)
 {
     $location_code = $this->unmarshal($this->db->f('location_code', true), 'string');
     // We get the data from the property module
     $data = execMethod('property.bolocation.read_single', array('location_code' => $location_code, 'extra' => array('view' => true)));
     $level = -1;
     $names = array();
     $levelFound = false;
     for ($i = 1; !$levelFound; $i++) {
         $loc_name = 'loc' . $i . '_name';
         if (array_key_exists($loc_name, $data)) {
             $level = $i;
             $names[$level] = $data[$loc_name];
         } else {
             $levelFound = true;
         }
     }
     $gab_id = '';
     $gabinfos = execMethod('property.sogab.read', array('location_code' => $location_code, 'allrows' => true));
     if ($gabinfos != null && is_array($gabinfos) && count($gabinfos) == 1) {
         $gabinfo = array_shift($gabinfos);
         $gab_id = $gabinfo['gab_id'];
     }
     $location = new rental_property_location($location_code, rental_uicommon::get_nicely_formatted_gab_id($gab_id), $level, $names);
     $location->set_address_1($data['street_name'] . ' ' . $data['street_number']);
     foreach ($data['attributes'] as $attributes) {
         switch ($attributes['column_name']) {
             case 'area_gross':
                 $location->set_area_gros($attributes['value']);
                 break;
             case 'area_net':
                 $location->set_area_net($attributes['value']);
                 break;
             case 'bruttoareal':
                 $location->set_area_gros($attributes['value']);
                 break;
             case 'nettoareal':
                 $location->set_area_net($attributes['value']);
                 break;
         }
     }
     return new rental_unit($this->unmarshal($this->db->f('id', true), 'int'), $this->unmarshal($this->db->f('composite_id', true), 'int'), $location);
 }