[0003305] Direct Purchase Invoice: added link to payment entry on final page.
[fa-stable.git] / purchasing / supplier_invoice.php
index 7bc308afc5e8de698ea153f69e0a5a001e1a088f..faf540e334c19c4cd261c4c7b9f55e986c726559 100644 (file)
@@ -178,27 +178,12 @@ function check_data()
                return false;
        }
 
-       if (!$Refs->is_valid($_SESSION['supp_trans']->reference)) 
+       if (!check_reference($_SESSION['supp_trans']->reference, ST_SUPPINVOICE, $_SESSION['supp_trans']->trans_no))
        {
-               display_error(_("You must enter an invoice reference."));
                set_focus('reference');
                return false;
        }
 
-       if (!is_new_reference($_SESSION['supp_trans']->reference, ST_SUPPINVOICE, $_SESSION['supp_trans']->trans_no))
-       {
-               display_error(_("The entered reference is already in use."));
-               set_focus('reference');
-               return false;
-       }
-
-       if (!$Refs->is_valid($_SESSION['supp_trans']->supp_reference)) 
-       {
-               display_error(_("You must enter a supplier's invoice reference."));
-               set_focus('supp_reference');
-               return false;
-       }
-
        if (!is_date( $_SESSION['supp_trans']->tran_date))
        {
                display_error(_("The invoice as entered cannot be processed because the invoice date is in an incorrect format."));
@@ -238,10 +223,6 @@ function handle_commit_invoice()
        $inv = $_SESSION['supp_trans'];
        $invoice_no = add_supp_invoice($inv);
 
-       // presume supplier data need correction
-       if ($inv->stored_algorithm != $inv->tax_algorithm)
-               update_supp_tax_algorithm($inv->supplier_id, $inv->tax_algorithm);
-
     $_SESSION['supp_trans']->clear_items();
     unset($_SESSION['supp_trans']);