Form submit/escape hotkeys added.
[fa-stable.git] / sales / customer_credit_invoice.php
index 7d318a9f18a61b92f3e73c1d2c1ff1a731291eeb..2d13e54729cb5eb2b2969803c9eae4867cc5518f 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>.
 ***********************************************************************/
 //---------------------------------------------------------------------------
 //
@@ -152,6 +152,9 @@ function check_quantities()
 {
        $ok =1;
        foreach ($_SESSION['Items']->line_items as $line_no=>$itm) {
+               if ($itm->quantity == $itm->qty_done) {
+                       continue; // this line was fully credited/removed
+               }
                if (isset($_POST['Line'.$line_no])) {
                        if (check_num('Line'.$line_no, 0, $itm->quantity)) {
                                $_SESSION['Items']->line_items[$line_no]->qty_dispatched =
@@ -226,7 +229,7 @@ function display_credit_items()
 {
        global $table_style, $table_style2;
 
-    start_form(false, true);
+    start_form();
        hidden('cart_id');
 
        start_table("$table_style2 width=80%", 5);
@@ -287,8 +290,8 @@ function display_credit_items()
     $k = 0; //row colour counter
 
     foreach ($_SESSION['Items']->line_items as $line_no=>$ln_itm) {
-               if ($ln_itm->quantity==$ln_itm->qty_done) {
-                       continue; // this line was fully credited
+               if ($ln_itm->quantity == $ln_itm->qty_done) {
+                       continue; // this line was fully credited/removed
                }
                alt_table_row_color($k);
 
@@ -382,7 +385,7 @@ display_credit_options();
 echo "<br><center>";
 submit('Update', _("Update"), true, _('Update credit value for quantities entered'), true);
 echo "&nbsp";
-submit('ProcessCredit', _("Process Credit Note"), true, '', true);
+submit('ProcessCredit', _("Process Credit Note"), true, '', 'default');
 echo "</center>";
 
 end_form();