Merged changes from main branch up to 2.1.3.
[fa-stable.git] / sales / credit_note_entry.php
index 348b2c3c75ad40a0732eebf76ab731a4f8a09a2b..f27bf8f0ad8617c4c9f9f81bbb6b58179253c707 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 /**********************************************************************
     Copyright (C) FrontAccounting, LLC.
-       Released under the terms of the GNU Affero General Public License,
-       AGPL, as published by the Free Software Foundation, either version 
-       of the License, or (at your option) any later version.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
-    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 //---------------------------------------------------------------------------
 //
@@ -178,7 +178,9 @@ if (isset($_POST['ProcessCredit']) && can_process()) {
        if (!isset($_POST['WriteOffGLCode'])) {
                $_POST['WriteOffGLCode'] = 0;
        }
+       copy_to_cn();
        $credit_no = $_SESSION['Items']->write($_POST['WriteOffGLCode']);
+       new_doc_date($_SESSION['Items']->document_date);
        processing_end();
        meta_forward($_SERVER['PHP_SELF'], "AddedID=$credit_no");
 
@@ -259,7 +261,7 @@ if (!processing_active()) {
 
 //-----------------------------------------------------------------------------
 
-start_form(false, true);
+start_form();
 hidden('cart_id');
 
 $customer_error = display_credit_header($_SESSION['Items']);
@@ -277,7 +279,7 @@ if ($customer_error == "") {
 
 echo "<br><center><table><tr>";
 submit_cells('Update', _("Update"));
-submit_cells('ProcessCredit', _("Process Credit Note"));
+submit_cells('ProcessCredit', _("Process Credit Note"), '', false, 'default');
 echo "</tr></table></center>";
 
 end_form();