/** * Echo the invoice status * @param integer $id * @return string */ function si_invoice_status($id = 0) { if (!$id) { $id = get_the_ID(); } echo apply_filters('si_invoice_status', si_get_invoice_status($id), $id); }
/** * Echo the invoice status * @param integer $id * @return string */ function si_invoice_status($id = 0) { if (!$id) { global $post; $id = $post->ID; } echo apply_filters('si_invoice_status', si_get_invoice_status($id), $id); }
<?php } ?> <?php } ?> </ol> <footer id="line_items_footer" class="si_clearfix"> <section id="doc_payment_wrap" class="si_clearfix"> <?php if (si_get_invoice_balance() && si_get_invoice_status() != 'write-off') { ?> <?php $payment_options = si_payment_options(); $payment_string = si_has_invoice_deposit() ? __('Pay Deposit', 'sprout-invoices') : __('Pay Invoice', 'sprout-invoices'); ?> <?php if (count($payment_options) === 0) { ?> <!-- no payment options --> <?php } elseif (count($payment_options) === 1) { ?> <?php foreach ($payment_options as $slug => $options) {
?> " alt="document logo" > <?php } else { ?> <img src="<?php echo si_doc_header_logo_url(); ?> " alt="document logo" > <?php } ?> </h1> </header><!-- /header --> <?php if (si_get_invoice_status() == 'write-off') { ?> <span id="status" class="void"><span class="inner_status"><?php _e('Void', 'sprout-invoices'); ?> </span></span> <?php } elseif (si_get_invoice_balance() > 0.0 && si_get_invoice_balance() <= si_get_invoice_payments_total()) { ?> <span id="status" class="void"><span class="inner_status"><?php _e('Payment Pending', 'sprout-invoices'); ?> </span></span> <?php } elseif (!si_get_invoice_balance()) { ?>
<?php } elseif (si_get_invoice_balance() > 0.0 && si_get_invoice_balance() <= si_get_invoice_payments_total()) { ?> <span id="status" class="void"><span class="inner_status"><?php esc_html_e('Payment Pending', 'sprout-invoices'); ?> </span></span> <?php } elseif (!si_get_invoice_balance()) { ?> <span id="status" class="paid"><span class="inner_status"><?php esc_html_e('Paid', 'sprout-invoices'); ?> </span></span> <?php } elseif ('temp' === si_get_invoice_status()) { ?> <span id="status" class="void"><span class="inner_status"><?php esc_html_e('TEMP', 'sprout-invoices'); ?> </span></span> <?php } ?> </div><!-- #header_logo --> <div id="vcards"> <?php do_action('si_document_vcards_pre'); ?> <dl id="doc_address_info">
?> pspsi-status-<?php echo esc_attr(si_invoice_status($invoice_id)); ?> pspsi-invoice-label"><?php si_invoice_status($invoice_id); ?> </span> </td> <td> <?php do_action('si_client_dashboard_payment_column', $invoice); ?> <?php if ('temp' === si_get_invoice_status($invoice_id)) { ?> <span class="badge"><?php si_invoice_balance($invoice_id); ?> </span> <br/> <small><?php _e('<b>Pending</b> Review', 'sprout-invoices'); ?> </small> <?php } elseif (si_get_invoice_balance($invoice_id)) { ?> <!-- Invoice has a balance --> <span class="badge balance_badge"><?php
/** * Display the content for the column * * @param string $column_name * @param int $id post_id * @return string */ public static function column_display($column_name, $id) { $estimate = SI_Estimate::get_instance($id); if (!is_a($estimate, 'SI_Estimate')) { return; // return for that temp post } switch ($column_name) { case 'doc_link': $invoice_id = $estimate->get_invoice_id(); if ($invoice_id) { printf('<a class="doc_link si_status %1$s" title="%2$s" href="%3$s">%4$s</a>', si_get_invoice_status($invoice_id), __('Invoice for this estimate.', 'sprout-invoices'), get_edit_post_link($invoice_id), '<div class="dashicons icon-sproutapps-invoices"></div>'); } break; case 'status': self::status_change_dropdown($id); break; case 'total': printf('<span class="estimate_total">%s</span>', sa_get_formatted_money($estimate->get_total(), $estimate->get_id())); break; case 'client': if ($estimate->get_client_id()) { $client = $estimate->get_client(); printf('<b><a href="%s">%s</a></b><br/><em>%s</em>', get_edit_post_link($client->get_ID()), get_the_title($client->get_ID()), $client->get_website()); } else { printf('<b>%s</b> ', __('No client', 'sprout-invoices')); } break; default: // code... break; } }
si_number_format((double) $data['time_val']); ?> </td> <td><?php sa_formatted_money($cost); ?> </td> <td> <?php if (isset($data['invoice_id'])) { ?> <a href="<?php echo get_edit_post_link($data['invoice_id']); ?> " class="si_status <?php echo si_get_invoice_status($data['invoice_id']); ?> "><span class="icon-sproutapps-invoices"></span></a> <?php } else { ?> <?php if (is_a($activity, 'SI_Time') && $activity->is_billable()) { ?> <span class="icon-sproutapps-invoices si_tooltip" title="<?php _e('Time is yet to be billed.', 'sprout-invoices'); ?> "></span> <?php } ?>