Added email links after creating documents
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 4 Aug 2009 09:13:17 +0000 (09:13 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 4 Aug 2009 09:13:17 +0000 (09:13 +0000)
CHANGELOG.txt
includes/ui/ui_controls.inc
manufacturing/work_order_entry.php
purchasing/po_entry_items.php
reporting/includes/reporting.inc
reporting/reports_main.php
sales/create_recurrent_invoices.php
sales/credit_note_entry.php
sales/customer_delivery.php
sales/customer_invoice.php
sales/sales_order_entry.php

index ddb0b232d4aa2d219b212682394d6060e08b4e92..f7270998267e49022dae8becebb561c001cc635c 100644 (file)
@@ -19,6 +19,19 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+04-Aug-2009 Joe Hunt
++ Added email links after creating documents
+$ /includes/ui/ui_controls.inc
+  /manufacturing/work_order_entry.php
+  /purchasing/po_entry_items.php
+  /reporting/reports_main.php
+  /reporting/includes/reporting.inc
+  /sales/create_recurrent_invoices.php
+  /sales/credit_note_entry.php
+  /sales/customer_delivery.php
+  /sales/customer_invoice.php
+  /sales/sales_order_entry.php
+  
 03-Aug-2009 Janusz Dobrowolski
 + Clone record option added.
 $ /includes/ui/ui_input.inc
index b05eaa80c64365e5ebdb2ebcb6dc7b34b2e016da..22236cc430f38d7f168e2109e4b5cda88e792b8e 100644 (file)
@@ -196,9 +196,9 @@ function submenu_view($title, $type, $number, $id=null)
        display_note(get_trans_view_str($type, $number, $title, false, 'menu_option', $id), 0, 1);
 }
 
-function submenu_print($title, $type, $number, $id=null)
+function submenu_print($title, $type, $number, $id=null, $email=0)
 {
-       display_note(print_document_link($number, $title, true, $type, false, 'menu_option', $id), 0, 1);
+       display_note(print_document_link($number, $title, true, $type, false, 'menu_option', $id, $email), 0, 1);
 }
 //-----------------------------------------------------------------------------------
 
index e0a0d283d6367d6c7d9ef75abc9b28899d98fcc9..c2560b47c2a86e8a95c3bfdcbb4a8d26df487bc7 100644 (file)
@@ -58,8 +58,10 @@ if (isset($_GET['AddedID']))
        if ($_GET['type'] != wo_types::advanced())
        {
                include_once($path_to_root . "/reporting/includes/reporting.inc");
-       $ar = array('PARAM_0' => $id, 'PARAM_1' => $id); 
+       $ar = array('PARAM_0' => $id, 'PARAM_1' => $id, 'PARAM_2' => 0); 
        display_note(print_link(_("Print this Work Order"), 409, $ar), 1);
+       $ar['PARAM_2'] = 1;
+       display_note(print_link(_("Email this Work Order"), 409, $ar), 1);
        display_note(get_gl_view_str($stype, $id, _("View the GL Journal Entries for this Work Order")), 1);
        $ar = array('PARAM_0' => $_GET['date'], 'PARAM_1' => $_GET['date'], 'PARAM_2' => $stype); 
        display_note(print_link(_("Print the GL Journal Entries for this Work Order"), 702, $ar), 1);
index b0d116995a73507ee649bfb39c2d5aab08bee265..ec3f619b5bdfce68702d019e19b91b22ec049647 100644 (file)
@@ -51,6 +51,7 @@ if (isset($_GET['AddedID']))
        display_note(get_trans_view_str($trans_type, $order_no, _("&View this order")));
        echo '<br>';
        display_note(print_document_link($order_no, _("&Print This Order"), true, $trans_type));
+       display_note(print_document_link($order_no, _("&Email This Order"), true, $trans_type, false, "", "", 1),0, 1);
 
        hyperlink_params($path_to_root . "/purchasing/po_receive_items.php", _("&Receive Items on this Purchase Order"), "PONumber=$order_no");
 
index a5a47fd24d8517d13f9a67e3ed05aaab36e98b53..43d03ef0a8cab7d9a1f9fe3c046bf77fbae02031 100644 (file)
@@ -15,7 +15,7 @@
 // You only need full parameter list for invoices/credit notes
 
 function print_document_link($doc_no, $link_text, $link=true, $type_no, 
-       $icon=false, $class='printlink', $id='')
+       $icon=false, $class='printlink', $id='', $email=0)
 {
        global $path_to_root;
        include_once($path_to_root . "/includes/types.inc");
@@ -32,7 +32,7 @@ function print_document_link($doc_no, $link_text, $link=true, $type_no,
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => "", 
                                'PARAM_3' => get_first_bank_account(), 
-                               'PARAM_4' => 0
+                               'PARAM_4' => $email
                                'PARAM_5' => 0, 
                                'PARAM_6' => "");
                        break;
@@ -42,7 +42,7 @@ function print_document_link($doc_no, $link_text, $link=true, $type_no,
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
-                               'PARAM_2' => 0
+                               'PARAM_2' => $email
                                'PARAM_3' => "");
                        break;
                case 10 : // Sales Invoice
@@ -54,7 +54,7 @@ function print_document_link($doc_no, $link_text, $link=true, $type_no,
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => "", 
                                'PARAM_3' => get_first_bank_account(), 
-                               'PARAM_4' => 0
+                               'PARAM_4' => $email
                                'PARAM_5' => "",
                                'PARAM_6' => "", 
                                'PARAM_7' => $type_no);
@@ -67,7 +67,7 @@ function print_document_link($doc_no, $link_text, $link=true, $type_no,
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => "", 
                                'PARAM_3' => get_first_bank_account(), 
-                               'PARAM_4' => 0
+                               'PARAM_4' => $email
                                'PARAM_5' => "");
                        break;
 //             default: $ar = array();
index 15f47d543a41073e4c679b1b5927ed718e6c1fb7..b074ec3cd687846d2ed84c82bd963dbfd73b2b46 100644 (file)
@@ -177,7 +177,7 @@ $reports->addReport(_('Manufactoring'),401,_('&Bill of Material Listing'),
 $reports->addReport(_('Manufactoring'),409,_('Print &Work Orders'),
        array(  new ReportParam(_('From'),'WORKORDER'),
                        new ReportParam(_('To'),'WORKORDER'),
-                       new ReportParam(_('email Customers'),'YES_NO'),
+                       new ReportParam(_('Email Locations'),'YES_NO'),
                        new ReportParam(_('Comments'),'TEXTBOX')));
 $reports->addReportClass(_('Dimensions'));
 if ($dim > 0)
index 603eef15eef5c4713ac67f0ada6abe8d850b883f..80b019a553c857f40890c2e5c9ddf433d7cf209a 100644 (file)
@@ -89,6 +89,8 @@ if (isset($_GET['recurrent']))
                $ar = array('PARAM_0' => $min,  'PARAM_1' => $max, 'PARAM_2' => "", 'PARAM_3' => get_first_bank_account(), 
                        'PARAM_4' => 0, 'PARAM_5' => 0, 'PARAM_6' => "", 'PARAM_7' => 10);
                display_note(print_link(_("&Print Recurrent Invoices # $min - # $max"), 107, $ar), 0, 1);
+               $ar['PARAM_4'] = 1; 
+               display_note(print_link(_("&Email Recurrent Invoices # $min - # $max"), 107, $ar), 0, 1);
        }
 }      
 
index 4b20b7474bcbf2448a7a3d391a547bd8743b7079..31f640f47ea2e143784ca20d0b30a64d612ca0a4 100644 (file)
@@ -68,6 +68,7 @@ if (isset($_GET['AddedID'])) {
        display_note(get_customer_trans_view_str($trans_type, $credit_no, _("&View this credit note")), 0, 1);
 
        display_note(print_document_link($credit_no, _("&Print This Credit Invoice"), true, 11),0, 1);
+       display_note(print_document_link($credit_no, _("&Email This Credit Invoice"), true, 11, false, "", "", 1),0, 1);
 
        display_note(get_gl_view_str($trans_type, $credit_no, _("View the GL &Journal Entries for this Credit Note")));
 
index 22349507cdfa01b7bbfa34b3f04701d1c01df65e..c0da3f3bb2741fdcae21e7175ca05b4580d2c98b 100644 (file)
@@ -52,6 +52,7 @@ if (isset($_GET['AddedID'])) {
        display_note(get_customer_trans_view_str(13, $dispatch_no, _("&View This Delivery")), 0, 1);
 
        display_note(print_document_link($dispatch_no, _("&Print Delivery Note"), true, 13));
+       display_note(print_document_link($dispatch_no, _("&Email Delivery Note"), true, 13, false, "", "", 1),0, 1);
 
        display_note(get_gl_view_str(13, $dispatch_no, _("View the GL Journal Entries for this Dispatch")),1);
 
index bd0e2d2bd9bfa6429fe827f2e917ea655a480de6..a73abf5025675bd8770c94b61e0bdb00d12db005 100644 (file)
@@ -57,6 +57,7 @@ if (isset($_GET['AddedID'])) {
        display_note(get_customer_trans_view_str($trans_type, $invoice_no, _("&View This Invoice")), 0, 1);
 
        display_note(print_document_link($invoice_no, _("&Print This Invoice"), true, 10));
+       display_note(print_document_link($invoice_no, _("&Email This Invoice"), true, 10, false, "", "", 1),0, 1);
 
        display_note(get_gl_view_str($trans_type, $invoice_no, _("View the GL &Journal Entries for this Invoice")),1);
 
index b1a52c7ec1ee9329a601ee7467d4ac14d56ffc7f..e7cd0636d2e54c591e146e1d6a0754a47f48e37b 100644 (file)
@@ -75,6 +75,7 @@ if (isset($_GET['AddedID'])) {
        submenu_view(_("&View This Order"), 30, $order_no);
 
        submenu_print(_("&Print This Order"), 30, $order_no, 'prtopt');
+       submenu_print(_("&Email This Order"), 30, $order_no, null, 1);
        set_focus('prtopt');
        
        submenu_option(_("Make &Delivery Against This Order"),
@@ -92,6 +93,7 @@ if (isset($_GET['AddedID'])) {
        submenu_view(_("&View This Order"), 30, $order_no);
 
        submenu_print(_("&Print This Order"), 30, $order_no, 'prtopt');
+       submenu_print(_("&Email This Order"), 30, $order_no, null, 1);
        set_focus('prtopt');
 
        submenu_option(_("Confirm Order Quantities and Make &Delivery"),
@@ -110,6 +112,7 @@ if (isset($_GET['AddedID'])) {
        submenu_view(_("&View This Delivery"), 13, $delivery);
 
        submenu_print(_("&Print Delivery Note"), 13, $delivery, 'prtopt');
+       submenu_print(_("&Email Delivery Note"), 13, $delivery, null, 1);
        set_focus('prtopt');
 
        display_note(get_gl_view_str(13, $delivery, _("View the GL Journal Entries for this Dispatch")),0, 1);
@@ -134,6 +137,7 @@ if (isset($_GET['AddedID'])) {
        submenu_view(_("&View This Invoice"), 10, $invoice);
 
        submenu_print(_("&Print Sales Invoice"), 10, $invoice, 'prtopt');
+       submenu_print(_("&Email Sales Invoice"), 10, $invoice, null, 1);
        set_focus('prtopt');
 
        display_note(get_gl_view_str(10, $invoice, _("View the GL &Journal Entries for this Invoice")),0, 1);