Added confirmation js dialogs for deleting and restoring backup file.
[fa-stable.git] / purchasing / supplier_invoice.php
index 371dfabc9b71409b7414c67169a63dc8f5ee9cca..5302ee670e774011182c69145e0670d2f8304802 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=5;
-$path_to_root="..";
+$page_security = 'SA_SUPPLIERINVOICE';
+$path_to_root = "..";
 
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 
@@ -45,6 +45,8 @@ if (isset($_GET['AddedID']))
 
        display_note(get_gl_view_str($trans_type, $invoice_no, _("View the GL Journal Entries for this Invoice")), 1);
 
+       hyperlink_no_params("$path_to_root/purchasing/supplier_payment.php", _("Entry supplier &payment for this invoice"));
+
        hyperlink_params($_SERVER['PHP_SELF'], _("Enter Another Invoice"), "New=1");
 
        hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), "filterType=$trans_type&trans_no=$invoice_no");
@@ -332,7 +334,7 @@ if ($id4 != -1)
 }
 
 $id2 = -1;
-if ($_SESSION["wa_current_user"]->access == 2)
+if ($_SESSION["wa_current_user"]->can_access('SA_GRNDELETE'))
 {
        $id2 = find_submit('void_item_id');
        if ($id2 != -1)