Recurrent Invoices: fixed buggy call to non existing function and payment terms type...
[fa-stable.git] / sales / credit_note_entry.php
index 2a3077b4c5787b5e6c9680d26e92b50fae916284..2f3bff18240f895d9188c4dc119254b536e9efa0 100644 (file)
@@ -175,7 +175,7 @@ if (isset($_POST['ProcessCredit']) && can_process()) {
                $_POST['WriteOffGLCode'] = 0;
        }
        copy_to_cn();
-       $credit_no = $_SESSION['Items']->write($_POST['WriteOffGLCode']);
+       $credit_no = write_sales_trans($_SESSION['Items'], $_POST['WriteOffGLCode']);
        if ($credit_no == -1)
        {
                display_error(_("The entered reference is already in use."));