Esempio n. 1
0
</a>
                                    </td>
                                </tr>
                        <?php 
    }
    ?>

                        </tbody>
					</table>
                        </div>

                        <?php 
    $fieldset_data = array('heading' => array('title' => _l('Invoice Payment History'), 'type' => 'h3'), 'elements_before' => ob_get_clean());
    echo module_form::generate_fieldset($fieldset_data);
    unset($fieldset_data);
    if (class_exists('module_finance', false) && module_finance::is_plugin_enabled() && module_finance::can_i('view', 'Finance') && module_finance::is_enabled() && is_file('includes/plugin_finance/pages/finance_invoice_edit.php') && module_config::c('invoice_show_finances', 1)) {
        include 'includes/plugin_finance/pages/finance_invoice_edit.php';
    }
}
// invoice_id check
hook_handle_callback('layout_column_half', 'end');
$form_actions = array('class' => 'action_bar action_bar_left', 'elements' => array(array('type' => 'save_button', 'name' => 'butt_save', 'onclick' => "\$('#form_redirect').val('" . (!$invoice_id && isset($_REQUEST['job_id']) && (int) $_REQUEST['job_id'] > 0 ? module_job::link_open($_REQUEST['job_id']) : module_invoice::link_open(false)) . "');", 'value' => _l('Save and Return')), array('type' => 'save_button', 'name' => 'butt_save', 'value' => _l('Save'))));
if ((int) $invoice_id) {
    if ($invoice['date_paid'] && $invoice['date_paid'] != '0000-00-00') {
        $form_actions['elements'][] = array('type' => 'save_button', 'class' => 'submit_button', 'name' => 'butt_email', 'value' => _l('Email Receipt'));
    } else {
        $form_actions['elements'][] = array('type' => 'submit', 'class' => 'submit_button', 'name' => 'butt_email', 'value' => _l('Email Invoice'));
    }
    if (function_exists('convert_html2pdf')) {
        if (!module_invoice::can_i('edit', 'Invoices')) {
            $form_actions['elements'][] = array('type' => 'button', 'class' => 'submit_button no_permissions', 'name' => 'butt_print', 'value' => _l('Print PDF'), 'onclick' => "window.location.href='" . module_invoice::link_public_print($invoice_id) . "';");
Esempio n. 2
0
        ?>

                    </tbody>
                </table>
                <?php 
    }
    ?>

                    </div>
                    <?php 
    $fieldset_data = array('heading' => array('title' => 'Job Invoices:', 'type' => 'h3'), 'elements_before' => ob_get_clean());
    if (module_invoice::can_i('create', 'Invoices')) {
        $fieldset_data['heading']['button'] = array('title' => _l('Create New Invoice'), 'url' => '#', 'id' => 'job_generate_invoice_button');
    }
    echo module_form::generate_fieldset($fieldset_data);
}
if (class_exists('module_finance', false) && module_finance::is_plugin_enabled() && module_finance::can_i('view', 'Finance') && (int) $job_id > 0 && module_finance::is_enabled() && is_file('includes/plugin_finance/pages/finance_job_edit.php')) {
    include 'includes/plugin_finance/pages/finance_job_edit.php';
}
?>


</form>
<?php 
// run the custom data hook to display items in this particular hook location
hook_handle_callback('custom_data_hook_location', _CUSTOM_DATA_HOOK_LOCATION_JOB_FOOTER, 'job', $job_id, $job);
hook_handle_callback('layout_column_half', 'end');
?>