Exemplo n.º 1
0
 public static function ticket_entry_is_required($tariffs_id)
 {
     return tariff::ticket_entry_is_required($tariffs_id);
 }
Exemplo n.º 2
0
          <?php 
if ($_POST['action'] == 'enter_data' || $_POST['action'] == 'save_data') {
    echo tep_draw_form('activity_entry', tep_href_link(FILENAME_TIMEREGISTRATION)) . tep_create_parameters(array('action' => 'save_data'), array('mPath', 'period', 'sort_order', 'selected_date', 'projects_id', 'roles_id', 'activity_id', 'error_level_history', 'previous_activity_amount', 'original_activity_amount'), 'hidden_field');
}
?>
          <tr>
            <td class="item_entry">
              <?php 
echo TEXT_ACTIVITY_AMOUNT . ' &amp; ' . TEXT_ACTIVITY_UNIT;
?>
            </td>
            <td class="item_entry">
              <?php 
echo tep_draw_input_field('activity_amount', '', 'size="1" maxlength="6" style="width: 20%"' . ($_POST['action'] == 'enter_data' || $_POST['action'] == 'save_data' ? '' : ' disabled'));
if ($_POST['action'] == 'enter_data' || $_POST['action'] == 'save_data') {
    echo tep_html_select('tariffs_id', tep_get_partial_array(tariff::get_selectable_tariffs($_SESSION['employee']->id, tep_strftime('%Y-%m-%d', $_POST['selected_date']), $_POST['roles_id']), 'tariffs_id', 'units_name'), TRUE, $_POST['tariffs_id'], 'size="1" style="width: 80%"');
} else {
    echo tep_html_select('tariffs_id', array(), FALSE, 0, 'size="1" style="width: 80%"');
}
?>
</select>
            </td>
          </tr>
          <tr>
            <td class="item_entry">
              &nbsp;
            </td>
            <td class="item_entry">
              <table border="0" cellspacing="0" cellpadding="2" width="250" class="item_entry">
                <tr>
                  <td width="50%" class="item_entry"><?php 
Exemplo n.º 3
0
 public static function get_selected_tree($tariffs_id = '')
 {
     $tariff = new tariff($tariffs_id);
     $employee_role = new employee_role($tariff->get_parent_id(), $tariff);
     return $employee_role;
 }
            $error_level = 11;
            // Related activities exist
            //$_POST['action'] = '';
        }
        // Format tariff amount from database to display
        $_POST['tariffs_amount_display'] = tep_number_db_to_user($_POST['tariffs_amount'], 2);
        // Format dates (from uts to display)
        $_POST['tariffs_start_date_display'] = tep_strftime(DATE_FORMAT_SHORT, $_POST['tariffs_start_date']);
        if ($_POST['tariffs_end_date'] != 0) {
            $_POST['tariffs_end_date_display'] = tep_strftime(DATE_FORMAT_SHORT, $_POST['tariffs_end_date']);
        } else {
            $_POST['tariffs_end_date_display'] = '';
        }
        break;
    case 'delete_entry_confirmed':
        $administration_tariff = new tariff($_POST['tariffs_id']);
        $administration_tariff->delete();
        unset($_POST['tariffs_id']);
        $_POST['action'] = '';
        break;
}
// Reload the tariff object in order to
// update the tariff listing below
$_SESSION['tariff'] = new tariff(0, $_POST['employees_roles_id']);
// header //
require DIR_WS_INCLUDES . 'header.php';
?>
<!-- body //-->
  <table style="border-width:0px;width:100%;border-spacing:3">
    <tr>
      <td style="width:<?php