예제 #1
0
        $rows_aux[$key]['status'] = $invoice['status'];
        $rows_aux[$key]['invoice_type'] = $invoice['invoice_type'];
        $rows_aux[$key]['reference'] = $invoice['reference'];
        $rows_aux[$key]['id_language'] = $invoice['id_language'];
        $rows_aux[$key]['internal_note'] = $invoice['internal_note'];
    }
    $rows = $rows_aux;
    $filename = clean_output('invoices_export') . '-' . date("YmdHi");
}
if ($export_csv_contracts) {
    $read = check_crm_acl('company', 'cr');
    if (!$read) {
        exit;
    }
    $where_clause = get_parameter('where_clause');
    $rows = crm_get_all_contracts(clean_output($where_clause));
    if ($read && $enterprise) {
        $rows = crm_get_user_contracts($config['id_user'], $rows);
    }
    $filename = clean_output('contracts_export') . '-' . date("YmdHi");
    if ($rows === false) {
        return;
    }
}
if ($export_csv_contacts) {
    $read = check_crm_acl('company', 'cr');
    if (!$read) {
        exit;
    }
    $where_clause = get_parameter('where_clause');
    $rows = crm_get_all_contacts(clean_output($where_clause));
예제 #2
0
            echo $id_usuario_nota;
            echo "</a>";
            echo " " . __("said on {$timestamp}");
            echo $contact_name;
            echo "</div>";
            // Body
            echo "<div class='notebody'>";
            echo clean_output_breaks($nota);
            echo "</div>";
        }
    }
} elseif ($op == "contracts") {
    //$contracts = get_contracts(false, "id_company = $id ORDER BY name");
    //$contracts = crm_get_user_contracts($config['id_user'], $contracts);
    $where_clause = "WHERE id_company={$id}";
    $contracts = crm_get_all_contracts($where_clause, 'name');
    $contracts = print_array_pagination($contracts, "index.php?sec=customers&sec2=operation/companies/company_detail&id={$id}&op=contracts");
    if ($contracts !== false) {
        $table->width = "99%";
        $table->class = "listing";
        $table->cellspacing = 0;
        $table->cellpadding = 0;
        $table->tablealign = "left";
        $table->data = array();
        $table->size = array();
        $table->style = array();
        $table->style[0] = 'font-weight: bold';
        $table->colspan = array();
        $table->head[0] = __('Name');
        $table->head[1] = __('Contract number');
        $table->head[2] = __('Company');
예제 #3
0
 echo "<a href='#' class='tip'><span>" . __('Date format is YYYY-MM-DD') . "</span></a>";
 echo "</td>";
 echo "<td>";
 echo print_input_text('search_date_end', $search_date_end, '', 15, 20, true, __('Ending To'));
 echo "<a href='#' class='tip'><span>" . __('Date format is YYYY-MM-DD') . "</span></a>";
 echo "</td>";
 echo "<td valign=bottom align='right'>";
 echo print_submit_button(__('Search'), "search_btn", false, 'class="sub search"', true);
 // Delete new lines from the string
 $where_clause = str_replace(array("\r", "\n"), '', $where_clause);
 echo print_button(__('Export to CSV'), '', false, 'window.open(\'include/export_csv.php?export_csv_contracts=1&where_clause=' . str_replace('"', "\\'", $where_clause) . '\')', 'class="sub csv"', true);
 echo "</td>";
 echo "</tr>";
 echo "</table>";
 echo '</form>';
 $contracts = crm_get_all_contracts($where_clause);
 $contracts = print_array_pagination($contracts, "index.php?sec=customers&sec2=operation/contracts/contract_detail&{$search_params}");
 if ($contracts !== false) {
     $table->width = "99%";
     $table->class = "listing";
     $table->cellspacing = 0;
     $table->cellpadding = 0;
     $table->tablealign = "left";
     $table->data = array();
     $table->size = array();
     $table->style = array();
     $table->colspan = array();
     $table->style[3] = "font-size: 8px";
     $table->style[4] = "font-size: 8px";
     $table->style[1] = "font-size: 9px";
     $table->head[0] = __('Name');