- display_note(get_trans_view_str(10, $invoice, _("&View This Invoice")));
- echo '<br>';
- display_note(print_document_link($invoice, _("&Print Sales Invoice"), true, 10));
+ submenu_print(_("&Print Sales Invoice"), ST_SALESINVOICE, $invoice."-".ST_SALESINVOICE, 'prtopt');
+ submenu_print(_("&Email Sales Invoice"), ST_SALESINVOICE, $invoice."-".ST_SALESINVOICE, null, 1);
+ set_focus('prtopt');
+
+ $sql = "SELECT trans_type_from, trans_no_from FROM ".TB_PREF."cust_allocations
+ WHERE trans_type_to=".ST_SALESINVOICE." AND trans_no_to=".db_escape($invoice);
+ $result = db_query($sql, "could not retrieve customer allocation");
+ $row = db_fetch($result);
+ if ($row !== false)
+ submenu_print(_("Print &Receipt"), $row['trans_type_from'], $row['trans_no_from']."-".$row['trans_type_from'], 'prtopt');
+
+ display_note(get_gl_view_str(ST_SALESINVOICE, $invoice, _("View the GL &Journal Entries for this Invoice")),0, 1);