Esempio n. 1
0
?>
</li>
       <li><?php 
$f->l_select_field_from_object('coa_id', coa::find_all(), 'coa_id', 'description', ${$class}->coa_id, 'coa_id', '', 1, $readonly1, '', '', '', 'coa_structure_id');
?>
</li>
       <li><?php 
$f->l_select_field_from_object('coa_structure_id', coa::coa_structures(), 'option_header_id', 'option_type', ${$class}->coa_structure_id, 'coa_structure_id', '', 1, 1);
?>
</li>
       <li><?php 
$f->l_select_field_from_object('currency_code', option_header::currencies(), 'option_line_code', 'option_line_code', ${$class}->currency_code, 'currency_code', '', 1, $readonly1);
?>
</li>
       <li><?php 
$f->l_select_field_from_object('calendar_option_line_code', gl_calendar::gl_calendar_names(), 'option_line_code', 'option_line_value', ${$class}->calendar_option_line_code, 'option_line_code', '', 1, $readonly1);
?>
</li>
       <li><?php 
$f->l_number_field_d('future_enabled_periods');
?>
</li>
       <li><?php 
$f->l_checkBox_field_d('rev_enabled');
?>
</li>
       <li><?php 
$f->l_text_field_d('rev_number');
?>
</li>
      </ul>
Esempio n. 2
0
         
            <tr class="gl_calendar<?php 
    echo $count;
    ?>
">
             <td>
              <?php 
    echo ino_inline_action(${$class}->gl_calendar_id, array('option_line_code' => $option_line_code_h));
    ?>
             </td>
             <td><?php 
    form::number_field_drs('gl_calendar_id');
    ?>
</td>
             <td><?php 
    echo form::select_field_from_object('calendar_type', gl_calendar::period_types(), 'option_line_code', 'option_line_value', ${$class}->calendar_type, '', $readonly);
    ?>
</td>
             <td><?php 
    form::text_field_widm('name_prefix');
    ?>
</td>
             <td class="yearPicker"><?php 
    form::number_field_wid('year');
    ?>
</td>
             <td><?php 
    form::number_field_wids('quarter');
    ?>
</td>
             <td><?php 
Esempio n. 3
0
</th>
         <th><?php 
echo __('Cal Id');
?>
</th>
        </tr>
       </thead>
       <tbody class="form_data_line_tbody calendar_values" >
        <?php 
$count = 0;
$gl_period_object_ai = new ArrayIterator($gl_period_object);
$gl_period_object_ai->seek($position);
while ($gl_period_object_ai->valid()) {
    $gl_period = $gl_period_object_ai->current();
    if (!empty(${$class}->gl_calendar_id)) {
        $cal_i = gl_calendar::find_by_id(${$class}->gl_calendar_id);
    } else {
        $cal_i = new gl_calendar();
    }
    ?>
         
         <tr class="calendar_line<?php 
    echo $count;
    ?>
">
          <td>
           <?php 
    echo ino_inline_action(${$class}->gl_period_id, array('ledger_id' => $gl_period->ledger_id));
    ?>
          </td>
          <td><?php 
Esempio n. 4
0
<?php

include_once "../../../includes/basics/basics.inc";
if (!empty($_GET['open_next_gl_period']) && !empty($_GET['new_gl_calendar_id']) && !empty($_GET['ledger_id'])) {
    $gl_p = new gl_period();
    $gl_p->ledger_id = $_GET['ledger_id'];
    $gl_p->gl_calendar_id = $_GET['new_gl_calendar_id'];
    $gl_p->status = 'OPEN';
    $gl_p->period_name = gl_calendar::find_by_id($gl_p->gl_calendar_id)->name;
    try {
        $gl_p->save();
        $dbc->confirm();
        return "<br>Period " . $gl_p->period_name . "is sucessfully opened";
    } catch (Exception $e) {
        return "<br>Failed to open the period <br>" . $e->getMessage();
    }
}
?>

<?php 
if (!empty($_GET['gl_ledger_id']) && !empty($_GET['find_open_periods'])) {
    $data = [];
    $gp = new gl_period();
    $ledger_id = $_GET['gl_ledger_id'];
    $all_open_periods = $gp->find_all_periods($ledger_id, 'OPEN');
    $period_id = $gp->current_open_period($ledger_id, 'OPEN')->gl_period_id;
    $data['period_name_stmt'] = $f->select_field_from_object('gl_period_id', $all_open_periods, 'gl_period_id', 'period_name', $period_id, 'gl_period_id', '', 1);
    if (count($data) > 0) {
        echo header('Content-Type: application/json');
        echo json_encode($data);
    }