Esempio n. 1
0
                        $('#invoice_task_items').delegate('.task_toggle_long_description','click',function(event){
                            event.preventDefault();
                            $(this).parent().find('.task_long_description').slideToggle(function(){
                                if($('textarea.edit_task_long_description').length>0){
                                    $('textarea.edit_task_long_description')[0].focus();
                                }
                            });
                            return false;
                        });
                    });
                </script>

                <?php 
// here we check if this invoice can be merged with any other invoices.
if ($invoice_id > 0 && !$invoice_locked && module_invoice::can_i('edit', 'Invoices') && (!isset($invoice['deposit_job_id']) || !$invoice['deposit_job_id']) && (!$invoice['date_cancel'] || $invoice['date_cancel'] == '0000-00-00') && !$invoice['total_amount_paid'] && ($invoice['customer_id'] > 0 || module_config::c('invoice_allow_merge_no_customer', 0))) {
    $merge_invoice_ids = module_invoice::check_invoice_merge($invoice_id);
    if ($merge_invoice_ids) {
        /**** MERGE INVOICES ****/
        ob_start();
        ?>

                        <div class="content_box_wheader" style="padding-bottom: 20px">
                            <p>
                                <?php 
        _e('We found %s other invoices from this customer that can be merged.', count($merge_invoice_ids));
        ?>

                                <?php 
        _h('You can generate invoices from multiple jobs (eg: a Hosting Setup job and a Web Development job) then you can combine them together here and send them as a single invoice to the customer, rather than sending multiple invoices.');
        ?>