[0000134] Voiding a supplier credit note didn't activate the PO Receivals and void...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 4 Jun 2009 18:46:53 +0000 (18:46 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 4 Jun 2009 18:46:53 +0000 (18:46 +0000)
CHANGELOG.txt
install.html
manufacturing/manage/bom_edit.php
purchasing/includes/db/invoice_db.inc
purchasing/po_receive_items.php
update.html

index 426d90f76e61c774238d6abee411c92aa70f7c57..8ab45d14a54474c21d165aa69f127a46b4f8ac3a 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+04-Jun-2009 Joe Hunt
+# [0000134] Voiding a supplier credit note didn't activate the PO Receivals and void the stock moves.
+$ /purchasing/includes/db/invoice_db.inc
+
 03-Jun-2009 Joe Hunt
 ! Changed to present reference number in Print Invoices/Credit Notes if global $print_invoice_no = 0
 $ /reporting/includes/reports_classes.inc
@@ -31,6 +35,10 @@ $ /reporting/rep302.php
 # When producing advanced manufacture there should be errors when insuffient qoh in items (if 'Allow Negative Stock' is not marked).
 $ /manufacturing/work_order_issue.php
   /manufacturing/work_order_add_finished.php
+# Missing decimal calculation in BOM edit.
+$ /manufacturing/manage/bom_edit.php
+# Wrong toottip text on Process button in Purchase Order, Receive Items.
+$ /purchase/po_receive_items.php
   
 27-May-2009 Joe Hunt
 # After heavy testing a new set of nested subtypes in COA, Monthly Breakdown, Balance Sheet and P&L Statement.
index a61c3784c5ebc1c10d4e2a95a55b7e2fb302a87b..7e3ec85ef22cbb7247f23ef2f4512c5350cfeb0f 100644 (file)
@@ -13,7 +13,7 @@ installed on the web server. </li>
 server - with <strong><em>innodb</em></strong>
 tables enabled (see notes below) </li>
 <li><strong><em>Adobe Acrobat Reader</em></strong>
-- for viewing the PDF reports before printing them out. </li>
+- or another PDF reader for viewing the PDF reports before printing them out. </li>
 </ul>
 <h2>Important Notes</h2>
 <ul>
@@ -136,7 +136,7 @@ user ROOT. A user with appropriate privileges must be set up. </li>
 password for &#8220;dbuser&#8221;. You would have entered this when you created
 &#8220;dbuser&#8221;. </li>
 <li>&#8220;<strong>dbname</strong>&#8221; is the name of
-the database. The provided scripts use the name OpenAccounting. </li>
+the database. The provided scripts use the name - frontaccount. </li>
 <li>&#8220;<strong>tbpref</strong>&#8221; is the table
 prefix for
 the tables. If you only have access to one database, you must use table
index 84f60733f7d2a1b4e84874414efeb8b516abc525..673a54329efb710f0b3e7aeb97c50b548e1395a2 100644 (file)
@@ -252,6 +252,7 @@ start_form();
                        $myrow = db_fetch($result);
 
                        $_POST['loc_code'] = $myrow["loc_code"];
+                       $_POST['component'] = $myrow["component"]; // by Tom Moulton
                        $_POST['workcentre_added']  = $myrow["workcentre_added"];
                        $_POST['quantity'] = number_format2($myrow["quantity"], get_qty_dec($myrow["component"]));
                label_row(_("Component:"), $myrow["component"] . " - " . $myrow["description"]);
index 2ee490189f08fb2e8233061deff7b00905752ed7..2ccafc4ced877cfe7db8642fd8b6be8c17de3878 100644 (file)
@@ -431,7 +431,17 @@ function void_supp_invoice($type, $type_no)
                                
                                $batch = get_grn_batch_from_item($details_row["grn_item_id"]);  
                                $grn = get_grn_batch($batch);
-                               
+                       if ($type == 21) // credit note 2009-06-14 Joe Hunt Must restore the po and grn
+                       {
+                                       $sql = "UPDATE ".TB_PREF."purch_order_details
+                                       SET quantity_ordered = quantity_ordered + ".-$details_row["quantity"].",
+                                   quantity_received = quantity_received + ".-$details_row["quantity"]."
+                                   WHERE po_detail_item = ".$details_row["po_detail_item_id"];
+                                       db_query($sql, "a purchase order details record could not be updated. This receipt of goods has not been processed ");
+                                       $sql = "UPDATE ".TB_PREF."grn_items SET qty_recd=qty_recd+".-$details_row["quantity"]."
+                                               WHERE id=".$details_row["grn_item_id"];
+                                       db_query($sql);
+                       }               
                                $diff = get_diff_in_home_currency($grn["supplier_id"], $old_date, $date_, $old[2], 
                                        $details_row["FullUnitPrice"]);
                                // Only adjust the avg for the diff
@@ -457,11 +467,12 @@ function void_supp_invoice($type, $type_no)
                                        update_stock_move_pid(13, $details_row["stock_id"], $old_date, $date_, 0, $mat_cost);
                                }
                                update_stock_move_pid(25, $details_row["stock_id"], $old_date, $old_date, $grn['supplier_id'], $mat_cost);
-
                }
         }
        }
 
+       if ($type == 21) // void the credits in stock moves
+               void_stock_move(21, $type_no); 
        void_supp_invoice_items($type, $type_no);
        void_trans_tax_details($type, $type_no);
 
index c8680d8586e31eae9ddb182524a577d772a97b4b..9664c54607c3b2695e92132180221dc0ef8f8300 100644 (file)
@@ -310,7 +310,7 @@ display_po_receive_items();
 
 echo '<br>';
 submit_center_first('Update', _("Update"), '', true);
-submit_center_last('ProcessGoodsReceived', _("Process Receive Items"), _("Clear all GL entry fields"), true);
+submit_center_last('ProcessGoodsReceived', _("Process Receive Items"), _("Process Receive Items"), true);
 
 end_form();
 
index 38310575a0f73721d509bc0f873ce6383142dab1..5f43f50a9f7fdc212ca4b001eb9779cd68447b6d 100644 (file)
@@ -28,8 +28,7 @@ backup this file if you have done manually changes to it.
 installed languages)
           </li>
           <li><strong>/modules/installed_modules.php</strong> (contains information about
-installed modules<strong></strong>)
-          </li>
+installed modules<strong></strong>)</li><li>installed_extensions.php (contains information about installed extensions to the menu system)</li>
           <li>if you have made <em>changes to other files</em>, like themes or so, backup
 these files too. </li>
         </ol>