Invoice PDF generation working properly

PDF's can be sent as mail attachment
This commit is contained in:
jekkos-t520
2015-02-19 15:32:16 +01:00
parent 50006aeb6a
commit 42c30bf30b
20 changed files with 111 additions and 59 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
application/config/email.php
application/config/database.php
*.patch
patches/

View File

@@ -167,9 +167,9 @@ class Config extends Secure_area
// load upload library
$config = array('upload_path' => './uploads/',
'allowed_types' => 'gif|jpg|png',
'max_size' => '100',
'max_width' => '640',
'max_height' => '480',
'max_size' => '1024',
'max_width' => '800',
'max_height' => '680',
'file_name' => 'company_logo');
$this->load->library('upload', $config);
$this->upload->do_upload('company_logo');

View File

@@ -330,11 +330,6 @@ class Sales extends Secure_area
function invoice_email($sale_id) {
$sale_data = $this->_load_sale_data($sale_id);
$sale_data['company_info'] = nl2br($sale_data['company_info']);
if (isset($sale_data['customer_info']) && !empty($sale_data['customer_info'])) {
$sale_data['customer_info'] = nl2br($sale_data['customer_info']);
}
// all images should use this prefix in their path
$sale_data['image_prefix'] = base_url();
$this->load->view('sales/invoice_email', $sale_data);
$this->sale_lib->clear_all();
@@ -343,10 +338,9 @@ class Sales extends Secure_area
function send_invoice($sale_id) {
$sale_data = $this->_load_sale_data($sale_id);
$message = $this->config->item('config_invoice_email_message');
$message = str_replace('$CO', $sale_data['invoice_number'], $message);
$message = $this->_substitute_customer($message,$sale_data['customer_first_name'],
$sale_data['customer_last_name']);
$text = $this->config->item('invoice_email_message');
$text = str_replace('$CO', $sale_data['invoice_number'], $text);
$text = $this->_substitute_customer($text,(object) $sale_data);
$result = FALSE;
$message = $this->lang->line('sales_invoice_no_email');
if (isset($sale_data["customer_email"]) && !empty( $sale_data["customer_email"])) {
@@ -354,6 +348,7 @@ class Sales extends Secure_area
$this->email->from($this->config->item('email'), $this->config->item('company'));
$this->email->to($sale_data['customer_email']);
$this->email->subject($this->lang->line('sales_invoice') . ' ' . $sale_data['invoice_number']);
$this->email->message($text);
$filename = $this->_invoice_email_pdf($sale_data);
$this->email->attach($filename);
$result = $this->email->send();
@@ -379,14 +374,14 @@ class Sales extends Secure_area
return $text;
}
function _substitute_customer($text, $first_name, $last_name)
function _substitute_customer($text, $cust_info)
{
// substitute customer info
$customer_id=$this->sale_lib->get_customer();
if($customer_id!=-1)
if($customer_id!=-1 && $cust_info!='')
{
$text=str_replace('$CU',$first_name . ' ' . $last_name,$text);
$words = preg_split("/\s+/", trim($first_name . ' ' . $last_name));
$text=str_replace('$CU',$cust_info->first_name . ' ' . $cust_info->last_name,$text);
$words = preg_split("/\s+/", trim($cust_info->first_name . ' ' . $cust_info->last_name));
$acronym = "";
foreach ($words as $w) {
$acronym .= $w[0];
@@ -396,24 +391,24 @@ class Sales extends Secure_area
return $text;
}
function _substitute_variables($text, $first_name, $last_name)
function _substitute_variables($text, $cust_info)
{
$text=$this->_substitute_variable($text, '$YCO', $this->Sale, 'get_invoice_number_for_year');
$text=$this->_substitute_variable($text, '$CO', $this->Sale , 'get_invoice_count');
$text=$this->_substitute_variable($text, '$SCO', $this->Sale_suspended, 'get_invoice_count');
$text=strftime($text);
$text=$this->_substitute_customer($text, $first_name, $last_name);
$text=$this->_substitute_customer($text, $cust_info);
return $text;
}
function _substitute_invoice_number($first_name,$last_name)
function _substitute_invoice_number($cust_info)
{
$invoice_number=$this->sale_lib->get_invoice_number();
if (empty($invoice_number))
{
$invoice_number=$this->config->config['sales_invoice_format'];
}
$invoice_number = $this->_substitute_variables($invoice_number,$first_name,$last_name);
$invoice_number = $this->_substitute_variables($invoice_number, $cust_info);
$this->sale_lib->set_invoice_number($invoice_number);
return $invoice_number;
}
@@ -443,8 +438,8 @@ class Sales extends Secure_area
{
$cust_info=$this->Customer->get_info($customer_id);
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
$data['customer_first_name']=$cust_info->first_name;
$data['customer_last_name']=$cust_info->last_name;
$data['first_name']=$cust_info->first_name;
$data['last_name']=$cust_info->last_name;
$data['customer_address'] = $cust_info->address_1;
$data['customer_location'] = $cust_info->zip . ' ' . $cust_info->city;
$data['customer_email'] = $cust_info->email;
@@ -610,7 +605,7 @@ class Sales extends Secure_area
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
$data['customer_email']=$cust_info->email;
}
$data['invoice_number']=$this->_substitute_invoice_number($cust_info->first_name, $cust_info->last_name);
$data['invoice_number']=$this->_substitute_invoice_number($cust_info);
$data['invoice_number_enabled']=$this->sale_lib->is_invoice_number_enabled();
$data['payments_cover_total']=$this->_payments_cover_total();
$this->load->view("sales/register",$data);

View File

@@ -203,7 +203,7 @@ def("DOMPDF_DEFAULT_PAPER_SIZE", "letter");
* Used if no suitable fonts can be found. This must exist in the font folder.
* @var string
*/
def("DOMPDF_DEFAULT_FONT", "serif");
def("DOMPDF_DEFAULT_FONT", "Helvetica");
/**
* Image DPI setting
@@ -300,7 +300,7 @@ def("DOMPDF_FONT_HEIGHT_RATIO", 1.1);
* Allows people to disabled CSS float support
* @var bool
*/
def("DOMPDF_ENABLE_CSS_FLOAT", false);
def("DOMPDF_ENABLE_CSS_FLOAT", true);
/**
* Enable the built in DOMPDF autoloader

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Waardebon Resterend";
$lang["sales_discount_included"] = "% korting inbegrepen";
$lang["sales_invoice"] = "Factuur";
$lang["sales_total_tax_exclusive"] = "Totaal";
$lang["sales_send_invoice"] = "Vestuur Factuur";
$lang["sales_invoice_confirm"] = "Deze factuur zal verstuurd worden naar";
$lang["sales_invoice_no_email"] = "Er werd geen email adres gevonden voor deze klant";
$lang["sales_invoice_sent"] = "Factuur verstuurd naar";
$lang["sales_invoice_unsent"] = "Fout bij het versturen van factuur naar ";
$lang["sales_invoice_unsent"] = "Fout bij het versturen van factuur naar";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -93,6 +93,8 @@ $lang["sales_giftcard_balance"] = "Giftcard Balance";
$lang["sales_discount_included"] = "% discount included";
$lang["sales_invoice"] = "Invoice";
$lang["sales_total_tax_exclusive"] = "Tax excluded";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_sent"] = "Invoice sent to";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to ";
$lang["sales_invoice_unsent"] = "Invoice failed to be sent to";

View File

@@ -189,19 +189,22 @@ $(document).ready(function()
{
$('#receipt_printer').append($('<option>', { value : value }).text(value));
});
var print_after_sale = $("#print_after_sale").is(":checked");
$("#print_after_sale").change(function()
var enable_disable_print_settings = (function()
{
$("input[id*='margin'], #print_footer, #print_header, #receipt_printer, #print_silently").prop('disabled', !$(this).is(":checked"));
});
$("input[id*='margin'], #print_footer, #print_header, #receipt_printer, #print_silently").prop('disabled', !window.jsPrintSetup || !print_after_sale);
var print_after_sale = $("#print_after_sale").is(":checked");
$("input[id*='margin'], #print_footer, #print_header, #receipt_printer, #print_silently").prop('disabled', !window.jsPrintSetup || !print_after_sale);
return arguments.callee;
})();
$("#print_after_sale").change(enable_disable_print_settings);
var use_invoice_template = $("#use_invoice_template").is(":checked");
$("#use_invoice_template").change(function()
var enable_disable_use_invoice_template = (function()
{
$("#invoice_default_comments, #invoice_email_message").prop('disabled', !$(this).is(":checked"));
});
$("#invoice_default_comments, #invoice_email_message").prop('disabled', !use_invoice_template);
var use_invoice_template = $("#use_invoice_template").is(":checked");
$("#invoice_default_comments, #invoice_email_message").prop('disabled', !use_invoice_template);
return arguments.callee;
})();
$("#use_invoice_template").change(enable_disable_use_invoice_template);
$('#receipt_printer option[value="<?php echo $this->config->item('receipt_printer'); ?>"]').prop('selected', true);
@@ -211,6 +214,11 @@ $(document).ready(function()
submitHandler:function(form)
{
$(form).ajaxSubmit({
beforeSerialize: function(arr, $form, options) {
dialog_confirmed = dialog_confirmed || confirm('<?php echo $this->lang->line('config_jsprintsetup_required'); ?>');
$("input:disabled, textarea:disabled").prop("disabled", false);
return dialog_confirmed;
},
success:function(response)
{
if(response.success)
@@ -221,14 +229,13 @@ $(document).ready(function()
{
set_feedback(response.message,'error_message',true);
}
// set back disabled state
enable_disable_use_invoice_template();
enable_disable_print_settings();
},
dataType:'json'
});
},
beforeSubmit: function(arr, $form, options) {
dialog_confirmed = dialog_confirmed || confirm('<?php echo $this->lang->line('config_jsprintsetup_required'); ?>');
$("input [disabled]").prop("disabled", false);
},
errorLabelContainer: "#receipt_error_message_box",
wrapper: "li",

View File

@@ -23,7 +23,13 @@
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('sales_invoice_number').':', 'invoice_number'); ?>
<div class='form_field'>
<?php echo form_input(array('name' => 'invoice_number', 'value' => $sale_info['invoice_number'], 'id' => 'invoice_number'));?>
<?php if (isset($sale_info["invoice_number"]) && !empty($sale_info["invoice_number"]) &&
isset($sale_info['customer_id']) && isset($sale_info['email']) && !empty($sale_info['email'])): ?>
<?php echo form_input(array('name'=>'invoice_number','size'=>10, 'value'=>$sale_info['invoice_number'], 'id'=>'invoice_number'));?>
<a id="send_invoice" href="javascript:void(0);"><?=$this->lang->line('sales_send_invoice')?></a>
<?php else: ?>
<?php echo form_input(array('name'=>'invoice_number','value'=>$sale_info['invoice_number'], 'id'=>'invoice_number'));?>
<?php endif; ?>
</div>
</div>
@@ -74,7 +80,19 @@
$(document).ready(function()
{
<?php if (isset($sale_info['email'])): ?>
$("#send_invoice").click(function(event) {
if (confirm("<?php echo $this->lang->line('sales_invoice_confirm') . ' ' . $sale_info['email'] ?>")) {
$.get('<?=site_url() . "/sales/send_invoice/" . $sale_info['sale_id']?>',
function(response) {
tb_remove();
post_form_submit(response);
}, "json"
);
}
});
<?php endif; ?>
$.validator.addMethod("invoice_number", function(value, element)
{
return JSON.parse($.ajax(

View File

@@ -1,8 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" rev="stylesheet" href="<?php echo base_url();?>css/invoice_email.css"/>
<script src="<?php echo base_url();?>js/jquery-1.4.4.min.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
</head>
<body>
<?php
@@ -33,15 +35,17 @@ if (isset($error_message))
?>
</td>
<td id="customer-title">
<pre>
<?php if(isset($customer))
{
echo $customer_info;
}
?>
</pre>
</td>
</tr>
<tr>
<td id="company-title"><?php echo $company_info; ?></td>
<td id="company-title"><pre><?php echo $company_info; ?></pre></td>
<td id="meta">
<table align="right">
<tr>

View File

@@ -6,16 +6,17 @@
#menubar, #footer { display: none; }
* { margin: 0; padding: 0; }
body { font-family: Helvetica; font-size: 13px; }
#page-wrap { width: 800px; margin: 0 auto; }
#page-wrap { width: 750px; margin: 0 auto; }
pre { font-family: Helvetica; font-size: 13px; }
#page-wrap { font-family: Helvetica; }
#page-wrap table { border-collapse: collapse; }
#page-wrap table#items td { padding: 10px; }
#page-wrap #meta table td, #page-wrap table th { border: 1px solid black; padding: 5px; }
#header { height: 30px; width: 100%; margin: 20px 0; background: #222222; text-align: center; color: white; font: bold 26px Helvetica; text-decoration: uppercase; letter-spacing: 4px; padding: 8px 0px; }
#header { height: 30px; width: 100%; margin: 20px 0; background-color: #222222; text-align: center; color: white; font-weight: bold; font-size: 26px; letter-spacing: 4px; padding: 8px 0px; text-transform: uppercase; }
/* first row */
#info { width: 100%; height: 130px; margin: 10px 0 20px 0; }
#info { width: 100%; margin: 10px 0 30px 0; }
#logo { width: 50%; text-align: left; border: 1px solid #ffffff; overflow: hidden; }
#image { height: 120px; width: 163px; }
#logoctr { display: none; }
@@ -25,7 +26,7 @@ body { font-family: Helvetica; font-size: 13px; }
.edit #logohelp { display: block; }
.edit #save-logo, .edit #cancel-logo { display: inline; }
.edit #image, #save-logo, #cancel-logo, .edit #change-logo, .edit #delete-logo { display: none; }
#customer-title { width: 50%; text-align: right; }
#customer-title { text-align: right; }
#terms div { width: 100%; text-align: center; margin-bottom: 10px;}
/* second row */
@@ -39,7 +40,7 @@ body { font-family: Helvetica; font-size: 13px; }
#items td.description { width: 300px; }
#items td.item-name { width: 175px; }
#items td.total-line { text-align: right; border-width: 1px 0 1px 1px; border-style: solid; }
#items td.total-value { border-width: 1px 0px 1px 0; border-style: solid; }
#items td.total-value { text-align: right; border-width: 1px 0px 1px 0; border-style: solid; }
#items td.centered-value { text-align: center; }
#items td.balance { background: #eeeee; }
#items td.blank { border: 0; }

View File

@@ -14,6 +14,12 @@
font-weight:bold;
}
#company_name img
{
max-width: 150px;
max-height: 150px;
}
#company_phone
{
margin-bottom:15px;

View File

@@ -310,7 +310,7 @@ function reinit_row(checkbox_id)
function animate_row(row,color)
{
color = color || "#e1ffdd";
row.find("td").css("backgroundColor", "#ffffff").animate({backgroundColor:color},"slow","linear")
row.find("td").animate({backgroundColor:color},"slow","linear")
.animate({backgroundColor:color},5000)
.animate({backgroundColor:"#ffffff"},"slow","linear");
}

View File

@@ -92,6 +92,8 @@ sales_giftcard_balance,Waardebon Resterend,Giftcard Balance,Giftcard Balance,Gif
sales_discount_included,% korting inbegrepen,% discount included,% discount included,% discount included,% discount included,% discount included,% discount included,% discount included,% discount included
sales_invoice,Factuur,Invoice,Invoice,Invoice,Invoice,Invoice,Invoice,Invoice,Invoice
sales_total_tax_exclusive,Totaal,Tax excluded,Tax excluded,Tax excluded,Tax excluded,Tax excluded,Tax excluded,Tax excluded,Tax excluded
sales_send_invoice,Vestuur Factuur,Send Invoice,Send Invoice,Send Invoice,Send Invoice,Send Invoice,Send Invoice,Send Invoice,Send Invoice
sales_invoice_confirm,Deze factuur zal verstuurd worden naar,This invoice will be sent to,This invoice will be sent to,This invoice will be sent to,This invoice will be sent to,This invoice will be sent to,This invoice will be sent to,This invoice will be sent to,This invoice will be sent to
sales_invoice_no_email,Er werd geen email adres gevonden voor deze klant,This customer does not have a valid email address,This customer does not have a valid email address,This customer does not have a valid email address,This customer does not have a valid email address,This customer does not have a valid email address,This customer does not have a valid email address,This customer does not have a valid email address,This customer does not have a valid email address
sales_invoice_sent,Factuur verstuurd naar,Invoice sent to,Invoice sent to,Invoice sent to,Invoice sent to,Invoice sent to,Invoice sent to,Invoice sent to,Invoice sent to
sales_invoice_unsent,Fout bij het versturen van factuur naar ,Invoice failed to be sent to ,Invoice failed to be sent to ,Invoice failed to be sent to ,Invoice failed to be sent to ,Invoice failed to be sent to ,Invoice failed to be sent to ,Invoice failed to be sent to ,Invoice failed to be sent to
sales_invoice_unsent,Fout bij het versturen van factuur naar,Invoice failed to be sent to,Invoice failed to be sent to,Invoice failed to be sent to,Invoice failed to be sent to,Invoice failed to be sent to,Invoice failed to be sent to,Invoice failed to be sent to,Invoice failed to be sent to
1 label nl-BE es en fr zh ru th tr id
92 sales_discount_included % korting inbegrepen % discount included % discount included % discount included % discount included % discount included % discount included % discount included % discount included
93 sales_invoice Factuur Invoice Invoice Invoice Invoice Invoice Invoice Invoice Invoice
94 sales_total_tax_exclusive Totaal Tax excluded Tax excluded Tax excluded Tax excluded Tax excluded Tax excluded Tax excluded Tax excluded
95 sales_send_invoice Vestuur Factuur Send Invoice Send Invoice Send Invoice Send Invoice Send Invoice Send Invoice Send Invoice Send Invoice
96 sales_invoice_confirm Deze factuur zal verstuurd worden naar This invoice will be sent to This invoice will be sent to This invoice will be sent to This invoice will be sent to This invoice will be sent to This invoice will be sent to This invoice will be sent to This invoice will be sent to
97 sales_invoice_no_email Er werd geen email adres gevonden voor deze klant This customer does not have a valid email address This customer does not have a valid email address This customer does not have a valid email address This customer does not have a valid email address This customer does not have a valid email address This customer does not have a valid email address This customer does not have a valid email address This customer does not have a valid email address
98 sales_invoice_sent Factuur verstuurd naar Invoice sent to Invoice sent to Invoice sent to Invoice sent to Invoice sent to Invoice sent to Invoice sent to Invoice sent to
99 sales_invoice_unsent Fout bij het versturen van factuur naar Fout bij het versturen van factuur naar Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to Invoice failed to be sent to