コード例 #1
0
    $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;\\">&nbsp;</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_invoiced += si_get_invoice_calculated_total();
    $table_total_paid += si_get_invoice_payments_total();
    $table_total_balance += si_get_invoice_balance();
    $client_name = si_get_invoice_client_id() ? sprintf('<a href="%s">%s</a>', get_edit_post_link(si_get_invoice_client_id()), get_the_title(si_get_invoice_client_id())) : __('N/A', 'sprout-invoices');
    ?>
						<tr> 
							<td><?php 
    echo si_get_invoice_id(get_the_id());
    ?>
</td>
							<td><span class="si_status <?php 
    si_invoice_status();
    ?>
"><?php 
    si_invoice_status();
    ?>
</span></td>
							<td><?php 
    si_invoice_issue_date();
    ?>
</td>
							<td><?php 
    printf('<a href="%s">%s</a>', get_edit_post_link(get_the_ID()), get_the_title(get_the_ID()));
コード例 #2
0
ファイル: invoice.php プロジェクト: aldoyh/library
do_action('si_document_details_pre');
?>

							<dl class="date">
								<dt><span class="dt_heading"><?php 
_e('Date', 'sprout-invoices');
?>
</span></dt>
								<dd><?php 
si_invoice_issue_date();
?>
</dd>
							</dl>

							<?php 
if (si_get_invoice_id()) {
    ?>
								<dl class="invoice_number">
									<dt><span class="dt_heading"><?php 
    _e('Invoice Number', 'sprout-invoices');
    ?>
</span></dt>
									<dd><?php 
    si_invoice_id();
    ?>
</dd>
								</dl>
							<?php 
}
?>
コード例 #3
0
 /**
  * Echo the invoice id
  * @param  integer $id 
  * @return string      
  */
 function si_invoice_id($id = 0)
 {
     if (!$id) {
         global $post;
         $id = $post->ID;
     }
     echo apply_filters('si_invoice_id', si_get_invoice_id($id), $id);
 }
コード例 #4
0
 /**
  * Echo the invoice id
  * @param  integer $id
  * @return string
  */
 function si_invoice_id($id = 0)
 {
     if (!$id) {
         $id = get_the_ID();
     }
     echo apply_filters('si_invoice_id', si_get_invoice_id($id), $id);
 }
コード例 #5
0
 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;
 }