Ejemplo n.º 1
0
</td>
		  <?php 
}
?>
          <?php 
if (ENABLE_MULTI_BRANCH) {
    ?>
            <td align="center"><?php 
    echo html_pull_down_menu('store_id', gen_get_store_ids(), $order->store_id ? $order->store_id : $_SESSION['admin_prefs']['def_store_id']);
    ?>
</td>
		  <?php 
}
?>
          <td align="center"><?php 
echo html_pull_down_menu('rep_id', gen_get_rep_ids($account_type), $order->rep_id ? $order->rep_id : $default_sales_rep);
?>
</td>
<?php 
if ($template_options['terms']) {
    echo '<td align="center">' . html_input_field('terms_text', gen_terms_to_language('0', true, 'ap'), 'readonly="readonly" size="25"') . '&nbsp;' . html_icon('apps/accessories-text-editor.png', ACT_TERMS_DUE, 'small', 'align="top" style="cursor:pointer" onclick="TermsList()"') . '</td>';
}
if ($template_options['terminal_date']) {
    echo '<td align="center">' . html_calendar_field($cal_terminal) . '</td>';
}
?>
          <td align="center">
			<?php 
echo html_pull_down_menu('gl_acct_id', $gl_array_list, $order->gl_acct_id, '');
?>
          </td>
Ejemplo n.º 2
0
 // now fall through just like edit
 case 'edit':
 case 'update':
 case 'new':
     for ($i = 1; $i < 13; $i++) {
         $j = $i < 10 ? '0' . $i : $i;
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => $j . '-' . strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $year = strftime('%Y', mktime(0, 0, 0, 1, 1, $i));
         $expires_year[] = array('id' => $year, 'text' => $year);
     }
     // load the tax rates
     $tax_rates = inv_calculate_tax_drop_down($type);
     $sales_rep_array = gen_get_rep_ids($type);
     $result = $db->Execute("select id, contact_first, contact_last, gl_type_account from " . TABLE_CONTACTS . " where type='e'");
     $reps = array();
     while (!$result->EOF) {
         $reps[$result->fields['id']] = $result->fields['contact_first'] . ' ' . $result->fields['contact_last'];
         $result->MoveNext();
     }
     $include_template = 'template_detail.php';
     define('PAGE_TITLE', $_REQUEST['action'] == 'new' ? $cInfo->page_title_new : constant('ACT_' . strtoupper($type) . '_PAGE_TITLE_EDIT') . ' - (' . $cInfo->short_name . ') ' . $cInfo->address[m][0]->primary_name);
     break;
 default:
     $heading_array = array('c.short_name' => constant('ACT_' . strtoupper($type) . '_SHORT_NAME'));
     if ($type == 'e') {
         $heading_array['c.contact_last,c.contact_first'] = GEN_EMPLOYEE_NAME;
     } else {
         $heading_array['a.primary_name'] = GEN_PRIMARY_NAME;
	  <td class="main"><?php 
echo html_input_field('account_number', $cInfo->account_number, 'size="17" maxlength="16"');
?>
</td>
     <td class="main">&nbsp;</td>
     <td class="main">&nbsp;</td>
	</tr>
	<tr>
	  <td align="right" class="main"><?php 
echo constant('ACT_' . strtoupper($type) . '_REP_ID');
?>
</td>
	  <td class="main">
	  <?php 
$default_selection = $action == 'new' ? $_SESSION['admin_id'] : $cInfo->dept_rep_id;
$selection_array = gen_get_rep_ids('v');
echo html_pull_down_menu('dept_rep_id', $selection_array, $default_selection);
?>
	  </td>
	  <td align="right" class="main"><?php 
echo constant('ACT_' . strtoupper($type) . '_ID_NUMBER');
?>
</td>
	  <td class="main"><?php 
echo html_input_field('gov_id_number', $cInfo->gov_id_number, 'size="17" maxlength="16"');
?>
</td>
     <td class="main">&nbsp;</td>
     <td class="main">&nbsp;</td>
	</tr>
  </table>