$i++; $percent = intval($i / $records->found_posts * 100) . '%'; // Javascript for updating the progress bar and information echo '<script language="javascript" id="progress_js"> document.getElementById("rows_progress").innerHTML="<div style=\\"width:' . $percent . ';background-color:#ddd;\\"> </div>"; document.getElementById("table_progress").innerHTML="' . sprintf(__('%o records(s) of %o added.', 'sprout-invoices'), $i, $records->found_posts) . '"; document.getElementById("progress_js").remove(); </script>'; $table_total_estimated += si_get_estimate_total(); $table_subtotal += si_get_estimate_subtotal(); $invoice_name = si_get_estimate_invoice_id() ? sprintf('<a href="%s">%s</a>', get_edit_post_link(si_get_estimate_invoice_id()), get_the_title(si_get_estimate_invoice_id())) : __('N/A', 'sprout-invoices'); $client_name = si_get_estimate_client_id() ? sprintf('<a href="%s">%s</a>', get_edit_post_link(si_get_estimate_client_id()), get_the_title(si_get_estimate_client_id())) : __('N/A', 'sprout-invoices'); ?> <tr> <td><?php echo si_get_estimate_id(get_the_id()); ?> </td> <td><span class="si_status estimate_status <?php si_estimate_status(); ?> "><?php si_estimate_status(); ?> </span></td> <td><?php si_estimate_issue_date(); ?> </td> <td><?php printf('<a href="%s">%s</a>', get_edit_post_link(get_the_ID()), get_the_title(get_the_ID()));
do_action('si_document_details_pre'); ?> <dl class="date"> <dt><span class="dt_heading"><?php si_e('Date'); ?> </span></dt> <dd><?php si_estimate_issue_date(); ?> </dd> </dl> <?php if (si_get_estimate_id()) { ?> <dl class="estimate_number"> <dt><span class="dt_heading"><?php si_e('Estimate Number'); ?> </span></dt> <dd><?php si_estimate_id(); ?> </dd> </dl> <?php } ?>
/** * Echo the estimate id * @param integer $id * @return string */ function si_estimate_id($id = 0) { if (!$id) { global $post; $id = $post->ID; } echo apply_filters('si_estimate_id', si_get_estimate_id($id), $id); }
/** * Echo the estimate id * @param integer $id * @return string */ function si_estimate_id($id = 0) { if (!$id) { $id = get_the_ID(); } echo apply_filters('si_estimate_id', si_get_estimate_id($id), $id); }
public static function username($atts = array()) { $id = 0; if (si_get_doc_context() == 'estimate') { $id = si_get_estimate_id(); } else { $id = si_get_invoice_id(); } $doc = si_get_doc_object($id); if (!$doc->get_client_id()) { return ''; } $user = si_default_client_user($client_id); if (!$user->exists()) { return ''; } return $user->display_name; }