コード例 #1
0
" />
    <input type="hidden" name="quote_id" value="<?php 
echo (int) $job['quote_id'];
?>
" />


    <?php 
$fields = array('fields' => array('name' => 'Name'));
module_form::set_required($fields);
//module_form::set_default_field('task_desc_new');
module_form::set_default_field('job_name');
module_form::prevent_exit(array('valid_exits' => array('.submit_button', '.save_task', '.delete', '.task_defaults')));
hook_handle_callback('layout_column_half', 1, '35');
/**** JOB DETAILS ****/
$fieldset_data = array('heading' => array('type' => 'h3', 'title' => 'Job Details'), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array('name' => array('title' => 'Job Title', 'field' => array('type' => 'text', 'name' => 'name', 'value' => $job['name'])), 'type' => array('title' => 'Type', 'field' => array('type' => 'select', 'name' => 'type', 'value' => $job['type'], 'blank' => false, 'options' => module_job::get_types(), 'allow_new' => true)), 'hourly_rate' => array('title' => 'Hourly Rate', 'ignore' => !module_invoice::can_i('view', 'Invoices'), 'field' => array('type' => 'currency', 'name' => 'hourly_rate', 'value' => number_out($job['hourly_rate']))), 'status' => array('title' => 'Status', 'field' => array('type' => 'select', 'name' => 'status', 'value' => $job['status'], 'blank' => false, 'options' => module_job::get_statuses(), 'allow_new' => true)), 'date_quote' => array('title' => 'Quote Date', 'ignore' => !module_config::c('job_allow_quotes', 0), 'field' => array('type' => 'date', 'name' => 'date_quote', 'value' => print_date($job['date_quote']), 'help' => 'This is the date the Job was quoted to the Customer. Once this Job Quote is approved, the Start Date will be set below.')), 'date_start' => array('title' => 'Start Date', 'field' => array('type' => 'date', 'name' => 'date_start', 'value' => print_date($job['date_start']), 'help' => 'This is the date the Job is scheduled to start work. This can be a date in the future. If you have the Calendar, this is the date that will be used for the Calendar event.')), 'time_start' => array('title' => 'Start Time', 'ignore' => !(class_exists('module_calendar', false) && module_config::c('job_show_times', 1)), 'field' => array('type' => 'time', 'name' => 'time_start', 'value' => isset($job['time_start']) ? $job['time_start'] : '', 'help' => 'This is the time the Job is scheduled to start.  If you have the Calendar, this is the time that will be used for the Calendar event.')), 'time_end' => array('title' => 'End Time', 'ignore' => !(class_exists('module_calendar', false) && module_config::c('job_show_times', 1)), 'field' => array('type' => 'time', 'name' => 'time_end', 'value' => isset($job['time_end']) ? $job['time_end'] : '', 'help' => 'This is the time the Job is scheduled to finish.  If you have the Calendar, this is the time that will be used for the Calendar event.')), 'date_due' => array('title' => 'Due Date', 'field' => array('type' => 'date', 'name' => 'date_due', 'value' => print_date($job['date_due']))), 'date_completed' => array('title' => 'Finished Date', 'field' => array('type' => 'date', 'name' => 'date_completed', 'value' => print_date($job['date_completed']))), 'user_id' => array('title' => 'Staff Member', 'ignore' => !module_config::c('job_allow_staff_assignment', 1), 'field' => array('type' => 'select', 'options' => $staff_member_rel, 'name' => 'user_id', 'value' => $job['user_id'], 'blank' => false, 'help' => 'Assign a staff member to this job. You can also assign individual tasks to different staff members. Staff members are users who have EDIT permissions on Job Tasks.'))), 'extra_settings' => array('owner_table' => 'job', 'owner_key' => 'job_id', 'owner_id' => $job['job_id'], 'layout' => 'table_row', 'allow_new' => module_job::can_i('create', 'Jobs'), 'allow_edit' => module_job::can_i('create', 'Jobs')));
$incrementing = false;
if (!isset($job['taxes']) || !count($job['taxes'])) {
    $job['taxes'][] = array();
    // at least have 1?
}
foreach ($job['taxes'] as $tax) {
    if (isset($tax['increment']) && $tax['increment']) {
        $incrementing = true;
    }
}
ob_start();
?>

    <span class="job_tax_increment">
        <input type="checkbox" name="tax_increment_checkbox" id="tax_increment_checkbox" value="1" <?php 
コード例 #2
0
ファイル: quote.php プロジェクト: sgh1986915/php-crm
 public static function get_statuses()
 {
     $sql = "SELECT `status` FROM `" . _DB_PREFIX . "quote` GROUP BY `status` ORDER BY `status`";
     $statuses = module_job::get_statuses();
     foreach (qa($sql) as $r) {
         $statuses[$r['status']] = $r['status'];
     }
     return $statuses;
 }
コード例 #3
0
ファイル: job_admin_list.php プロジェクト: sgh1986915/php-crm
		</td>
		<td>
			<input type="text" name="search[generic]" value="<?php 
echo isset($search['generic']) ? htmlspecialchars($search['generic']) : '';
?>
" size="30">
		</td>
		<td width="30">
			<?php 
echo _l('Status:');
?>

		</td>
		<td>
			<?php 
echo print_select_box(module_job::get_statuses(), 'search[status]', isset($search['status']) ? $search['status'] : '');
?>

		</td>
		<td class="search_action">
			<?php 
echo create_link("Reset", "reset", module_job::link_open(false));
?>

			<?php 
echo create_link("Search", "submit");
?>

		</td>
	</tr>
</table>
コード例 #4
0
ファイル: job_admin_list.php プロジェクト: sgh1986915/php-crm
if (module_job::can_i('create', 'Jobs')) {
    $header['button'][] = array('url' => module_job::link_open('new'), 'title' => 'Add New Job', 'type' => 'add');
}
if (class_exists('module_import_export', false) && module_job::can_i('view', 'Import Jobs')) {
    $link = module_import_export::import_link(array('callback' => 'module_job::handle_import', 'callback_preview' => 'module_job::handle_import_row_debug', 'name' => 'Jobs', 'return_url' => $_SERVER['REQUEST_URI'], 'group' => 'job', 'fields' => array('Job ID' => 'job_id', 'Job Title' => 'name', 'Hourly Rate' => 'hourly_rate', 'Start Date' => 'date_start', 'Due Date' => 'date_due', 'Completed Date' => 'date_completed', module_config::c('project_name_single', 'Website') . ' Name' => 'website_name', 'Customer Name' => 'customer_name', 'Type' => 'type', 'Status' => 'status', 'Staff Member' => 'staff_member', 'Tax Name' => 'total_tax_name', 'Tax Percent' => 'total_tax_rate', 'Renewal Date' => 'date_renew'), 'extra' => array('owner_table' => 'job', 'owner_id' => 'job_id')));
    $header['button'][] = array('url' => $link, 'title' => 'Import Jobs', 'type' => 'add');
}
print_heading($header);
?>



<form action="" method="post">

<?php 
$search_bar = array('elements' => array('name' => array('title' => _l('Job Title:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 30)), 'type' => array('title' => _l('Type:'), 'field' => array('type' => 'select', 'name' => 'search[type]', 'value' => isset($search['type']) ? $search['type'] : '', 'options' => module_job::get_types())), 'status' => array('title' => _l('Status:'), 'field' => array('type' => 'select', 'name' => 'search[status]', 'value' => isset($search['status']) ? $search['status'] : '', 'options' => module_job::get_statuses())), 'completed' => array('title' => _l('Completed:'), 'field' => array('type' => 'select', 'name' => 'search[completed]', 'value' => isset($search['completed']) ? $search['completed'] : '', 'options' => array(1 => _l('Both Completed and Non-Completed Jobs'), 2 => _l('Only Completed Jobs'), 3 => _l('Only Non-Completed Jobs'))))));
$staff = module_user::get_staff_members();
if (count($staff) > 0) {
    $search_bar['elements'][] = array('title' => _l('Staff:'), 'field' => array('type' => 'select', 'name' => 'search[user_id]', 'value' => isset($search['user_id']) ? $search['user_id'] : '', 'options' => $staff, 'options_array_id' => 'name'));
}
if (module_config::c('job_allow_quotes', 0)) {
    $search_bar['elements']['completed']['field']['options'][4] = _l('Only Quoted Jobs');
}
if (class_exists('module_extra', false)) {
    $search_bar['extra_fields'] = 'job';
}
if (class_exists('module_group', false) && module_job::can_i('view', 'Job Groups')) {
    $search_bar['elements']['group_id'] = array('title' => false, 'field' => array('type' => 'select', 'name' => 'search[group_id]', 'value' => isset($search['group_id']) ? $search['group_id'] : '', 'options' => module_group::get_groups('job'), 'options_array_id' => 'name', 'blank' => _l(' - Group - ')));
}
echo module_form::search_bar($search_bar);
/** START TABLE LAYOUT **/
コード例 #5
0
ファイル: job_admin_edit.php プロジェクト: sgh1986915/php-crm
								</td>
							</tr>
                            <?php 
}
?>

							<tr>
								<th>
									<?php 
echo _l('Status');
?>

								</th>
								<td>
									<?php 
echo print_select_box(module_job::get_statuses(), 'status', $job['status'], '', true, false, true);
?>

								</td>
							</tr>
                            <?php 
if (module_config::c('job_allow_quotes', 0)) {
    ?>

							<tr>
								<th>
									<?php 
    echo _l('Quote Date');
    ?>

								</th>