Commits

Michael Tunnell  committed a90e415

Added 4 Helper Functions:invoice_final_payment_date, merchant_account_id, merchant_currency_code, merchant_driver;Added an alt tag to the invoice_logo function;

  • Participants
  • Parent commits abbd462

Comments (0)

Files changed (2)

File application/helpers/mcb_invoice_helper.php

 
 }
 
+function merchant_account_id() {
+
+	global $CI;
+
+	return $CI->mdl_mcb_data->setting('merchant_account_id');
+	
+}
+
+function merchant_currency_code() {
+
+	global $CI;
+
+	return $CI->mdl_mcb_data->setting('merchant_currency_code');
+	
+}
+
+function merchant_driver() {
+
+	global $CI;
+
+	return $CI->mdl_mcb_data->setting('merchant_driver');
+	
+}
+
 function invoice_tax_id($invoice) {
 
 	global $CI;
 
 }
 
+function invoice_final_payment_date($invoice) {
+
+	global $CI;
+
+	/* Date the invoice was paid in full */
+	krsort($invoice->invoice_payments);
+	return date($CI->mdl_mcb_data->setting('default_date_format'), $invoice->invoice_payments['0']->payment_date);
+
+}
+
 function invoice_has_tax($invoice_tax_rate) {
 
 	/* Returns TRUE if the invoice has tax applied */
 		if ($output_type == 'pdf') {
 
 			/** Use a system path to include the image in the PDF **/
-			return '<img src="' . getcwd() . '/uploads/invoice_logos/' . $CI->mdl_mcb_data->setting('invoice_logo') . '" />';
+			return '<img src="' . getcwd() . '/uploads/invoice_logos/' . $CI->mdl_mcb_data->setting('invoice_logo') . '" alt="'.$CI->mdl_mcb_data->setting('invoice_logo').'" />';
 
 		}
 
 		elseif ($output_type == 'html') {
 
 			/** Use a URL to include the image in the HTML **/
-			return '<img src="' . base_url() . 'uploads/invoice_logos/' . $CI->mdl_mcb_data->setting('invoice_logo') . '" />';
+			return '<img src="' . base_url() . 'uploads/invoice_logos/' . $CI->mdl_mcb_data->setting('invoice_logo') . '" alt="'.$CI->mdl_mcb_data->setting('invoice_logo').'" />';
 
 		}
 
 
 }
 
-?>
+?>

File application/language/english/mcb_lang.php

 $lang['generated_invoice_html'] = 'Generated HTML Invoice';
 $lang['generated_invoice_pdf'] = 'Generated PDF Invoice';
 $lang['global_administrator'] = 'Global Administrator';
-$lang['grand_total'] = 'Grand Total';
+$lang['grand_total'] = 'Total';
 $lang['group_left_pad'] = 'Left Pad';
 $lang['group_next_id'] = 'Next ID';
 $lang['history'] = 'History';
 $lang['total'] = 'Total';
 $lang['total_balance'] = 'Total Balance';
 $lang['total_billed'] = 'Total Billed';
-$lang['total_due'] = 'Total Due';
-$lang['total_paid'] = 'Total Paid';
+$lang['total_due'] = 'Amount Due';
+$lang['total_paid'] = 'Amount Paid';
 $lang['total_tax'] = 'Total Tax';
 $lang['uninstall'] = 'Uninstall';
 $lang['unit'] = 'Unit';
 $lang['group_by'] = 'Group By';
 $lang['payment_entered'] = 'A payment of %s was applied';
 
-?>
+/* NEW FOR 0.13 */
+$lang['date_paid'] = 'Date Paid';
+
+?>