// Entry Direct Invoice
//
-$page_security = 'SA_SALESORDER';
$path_to_root = "..";
+$page_security = 'SA_SALESORDER';
include_once($path_to_root . "/sales/includes/cart_class.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/sales/includes/sales_db.inc");
include_once($path_to_root . "/sales/includes/db/sales_types_db.inc");
include_once($path_to_root . "/reporting/includes/reporting.inc");
+
+set_page_security( @$_SESSION['Items']->trans_type,
+ array( ST_SALESORDER=>'SA_SALESORDER',
+ ST_SALESQUOTE => 'SA_SALESQUOTE',
+ ST_CUSTDELIVERY => 'SA_SALESDELIVERY',
+ ST_SALESINVOICE => 'SA_SALESINVOICE'),
+ array( 'NewOrder' => 'SA_SALESORDER',
+ 'ModifySalesOrder' => 'SA_SALESORDER',
+ 'NewQuotation' => 'SA_SALESQUOTE',
+ 'ModifyQuotationNumber' => 'SA_SALESQUOTE',
+ 'NewDelivery' => 'SA_SALESDELIVERY',
+ 'NewInvoice' => 'SA_SALESINVOICE')
+);
+
$js = '';
if ($use_popup_windows) {
submenu_print(_("&Print Delivery Note"), ST_CUSTDELIVERY, $delivery, 'prtopt');
submenu_print(_("&Email Delivery Note"), ST_CUSTDELIVERY, $delivery, null, 1);
+ submenu_print(_("P&rint as Packing Slip"), ST_CUSTDELIVERY, $delivery, 'prtopt', null, 1);
+ submenu_print(_("E&mail as Packing Slip"), ST_CUSTDELIVERY, $delivery, null, 1, 1);
set_focus('prtopt');
display_note(get_gl_view_str(ST_CUSTDELIVERY, $delivery, _("View the GL Journal Entries for this Dispatch")),0, 1);