Line end cleanups.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Sun, 24 Mar 2013 10:10:38 +0000 (11:10 +0100)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Sun, 24 Mar 2013 10:10:38 +0000 (11:10 +0100)
manufacturing/includes/db/work_orders_db.inc
purchasing/includes/db/grn_db.inc
sales/inquiry/sales_orders_view.php

index 2aed7c1912876680a39523f78f77e181dc342497..a79c2574dab6e626556bc66d3ffb9a610fb71d3c 100644 (file)
@@ -71,7 +71,7 @@ function add_overhead_cost($stock_id, $qty, $date_, $costs, $adj_only=false)
                        $costs = $qty * $costs;
                if ($qoh>0)
                        $overhead_cost = ($qoh * $overhead_cost + $costs) / $qoh;
-               else // Journal Entry if QOH is 0/negative \r
+               else // Journal Entry if QOH is 0/negative 
                {
                        global $Refs;
 
@@ -124,7 +124,7 @@ function add_labour_cost($stock_id, $qty, $date_, $costs, $adj_only=false)
                        $costs = $qty * $costs;
                if ($qoh>0)
                        $labour_cost = ($qoh * $labour_cost + $costs) / $qoh;   
-               else // Journal Entry if QOH is 0/negative \r
+               else // Journal Entry if QOH is 0/negative 
                {
                        global $Refs;
 
@@ -153,7 +153,7 @@ function add_labour_cost($stock_id, $qty, $date_, $costs, $adj_only=false)
        {               
                if ($qoh + $qty != 0)   
                        $labour_cost = ($qoh * $labour_cost + $qty * $costs) /  ($qoh + $qty);
-       }       \r
+       }       
        $sql = "UPDATE ".TB_PREF."stock_master SET labour_cost=".db_escape($labour_cost)."
                WHERE stock_id=".db_escape($stock_id);
        db_query($sql,"The cost details for the inventory item could not be updated");
@@ -177,7 +177,7 @@ function add_issue_cost($stock_id, $qty, $date_, $costs, $adj_only=false)
                        $costs = $qty * $costs;
                if ($qoh>0)
                        $material_cost = $costs / $qoh;
-               else // Journal Entry if QOH is 0/negative\r
+               else // Journal Entry if QOH is 0/negative
                {
                        global $Refs;
 
@@ -206,7 +206,7 @@ function add_issue_cost($stock_id, $qty, $date_, $costs, $adj_only=false)
        {
                if ($qoh + $qty != 0)   
                        $material_cost = ($qty * $costs) /      ($qoh + $qty);
-       }       \r
+       }       
        $sql = "UPDATE ".TB_PREF."stock_master SET material_cost=material_cost+"
                .db_escape($material_cost)
                ." WHERE stock_id=".db_escape($stock_id);
@@ -444,9 +444,9 @@ function void_work_order($woid)
                                continue;
                        $memo_ = _("Voiding Work Order Trans # ").$woid;
                        add_audit_trail(ST_MANURECEIVE, $row['id'], today(), _("Voided.")."\n".$memo_);
-                       add_voided_entry(ST_MANURECEIVE, $row['id'], today(), $memo_);\r
+                       add_voided_entry(ST_MANURECEIVE, $row['id'], today(), $memo_);
                }
-\r
+
                $result = get_work_order_issues($woid);
                $cost = 0;
                $issue_no = 0;
@@ -463,13 +463,13 @@ function void_work_order($woid)
                        add_voided_entry(ST_MANUISSUE, $row['issue_no'], today(), $memo_);                              
                }
 
-               //Adust avg labour cost\r
-               $cost = get_gl_wo_cost($woid, WO_LABOUR); \r
+               //Adust avg labour cost
+               $cost = get_gl_wo_cost($woid, WO_LABOUR); 
                if ($cost != 0)
                        add_labour_cost($work_order['stock_id'], 1, $date, -$cost, true);
-                       \r
-               //Adust avg overhead cost\r
-               $cost = get_gl_wo_cost($woid, WO_OVERHEAD); \r
+                       
+               //Adust avg overhead cost
+               $cost = get_gl_wo_cost($woid, WO_OVERHEAD); 
                if ($cost != 0)
                        add_overhead_cost($work_order['stock_id'], 1, $date, -$cost, true);
                
index 24e421a6c3078c37b7e5bac16b8d2b7da2dc065a..2bfa00dcf3f337abc80a8d1c2e120526f55fc571 100644 (file)
@@ -13,8 +13,8 @@
 function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only=false)
 {
        //Handle if inventory will become negative
-    //8-OCT-2011 : Skip negative inventory adjustment for case of adjust_only\r
-    if (is_inventory_item($stock_id) && !$adj_only) \r
+    //8-OCT-2011 : Skip negative inventory adjustment for case of adjust_only
+    if (is_inventory_item($stock_id) && !$adj_only) 
         handle_negative_inventory($stock_id, $qty, $price, $date);     
 
        // probably this function should be optimized
@@ -46,8 +46,8 @@ function update_average_material_cost($supplier, $stock_id, $price, $qty, $date,
        $myrow = db_fetch($result);
        $material_cost = $myrow['material_cost'];
        
-       //Price adjustment for manufactured item\r
-       if (!$adj_only && $myrow['mb_flag'] == 'M') \r
+       //Price adjustment for manufactured item
+       if (!$adj_only && $myrow['mb_flag'] == 'M') 
        {
                $standard_cost = get_standard_cost($stock_id);
                //reduce overhead_cost and labour_cost from price as those will remain as is
@@ -117,8 +117,8 @@ function add_grn(&$po)
                                if ($clearing_act)
                                        $total += add_gl_trans_supplier(ST_SUPPRECEIVE, $grn, $date_, $stock_gl_code["inventory_account"],
                                                $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'],
-                                               $order_line->receive_qty * $order_line->taxfree_charge_price($po), $po->supplier_id, '', 0, $order_line->stock_id);\r
-                               update_average_material_cost($po->supplier_id, $order_line->stock_id, $order_line->price,\r
+                                               $order_line->receive_qty * $order_line->taxfree_charge_price($po), $po->supplier_id, '', 0, $order_line->stock_id);
+                               update_average_material_cost($po->supplier_id, $order_line->stock_id, $order_line->price,
                                        $order_line->receive_qty, $date_);
                        }               
                        //----------------------------------------------------------------------------------------------------------------
@@ -143,7 +143,7 @@ function add_grn(&$po)
                        /* Update location stock records - NB  a po cannot be entered for a service/kit parts done automatically */
                        add_stock_move(ST_SUPPRECEIVE, $order_line->stock_id, $grn, $po->Location, $date_, "",
                                $order_line->receive_qty, $order_line->standard_cost,
-                       $po->supplier_id, 1, $order_line->taxfree_charge_price($po));\r
+                       $po->supplier_id, 1, $order_line->taxfree_charge_price($po));
 
                } /*quantity received is != 0 */
        } /*end of order_line loop */
index 2d76536662a0feeb286011862762df1a0789a2fa..4ac964ad17004c6ace04b497c1e2b69ce083315b 100644 (file)
@@ -121,8 +121,8 @@ function prt_link($row)
 
 function edit_link($row) 
 {
-       if (@$_GET['popup'])\r
-               return '';\r
+       if (@$_GET['popup'])
+               return '';
        global $trans_type;
        $modify = ($trans_type == ST_SALESORDER ? "ModifyOrderNumber" : "ModifyQuotationNumber");
   return pager_link( _("Edit"),
@@ -217,7 +217,7 @@ if (get_post('_OrderNumber_changed') || get_post('_OrderReference_changed')) //
        $Ajax->activate('orders_tbl');
 }
 
-if (!@$_GET['popup'])\r
+if (!@$_GET['popup'])
        start_form();
 
 start_table(TABLESTYLE_NOBORDER);
@@ -239,8 +239,8 @@ if($show_dates) {
        start_row();
 }
 stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true);
-if (!@$_GET['popup'])\r
-       customer_list_cells(_("Select a customer: "), 'customer_id', null, true);\r
+if (!@$_GET['popup'])
+       customer_list_cells(_("Select a customer: "), 'customer_id', null, true);
 if ($trans_type == ST_SALESQUOTE)
        check_cells(_("Show All:"), 'show_all');
 
@@ -255,7 +255,7 @@ end_table(1);
 //     Orders inquiry table
 //
 $sql = get_sql_for_sales_orders_view($selected_customer, $trans_type, $_POST['OrderNumber'], $_POST['order_view_mode'],
-       @$selected_stock_item, @$_POST['OrdersAfterDate'], @$_POST['OrdersToDate'], @$_POST['OrderReference'], $_POST['StockLocation'], $_POST['customer_id']);\r
+       @$selected_stock_item, @$_POST['OrdersAfterDate'], @$_POST['OrdersToDate'], @$_POST['OrderReference'], $_POST['StockLocation'], $_POST['customer_id']);
 
 if ($trans_type == ST_SALESORDER)
        $cols = array(
@@ -285,11 +285,11 @@ else
                'Type' => 'skip',
                _("Currency") => array('align'=>'center')
        );
-if ($_POST['order_view_mode'] == 'OutstandingOnly') {\r
-       //array_substitute($cols, 4, 1, _("Cust Order Ref"));\r
-       array_append($cols, array(\r
-               array('insert'=>true, 'fun'=>'dispatch_link'),\r
-               array('insert'=>true, 'fun'=>'edit_link')));\r
+if ($_POST['order_view_mode'] == 'OutstandingOnly') {
+       //array_substitute($cols, 4, 1, _("Cust Order Ref"));
+       array_append($cols, array(
+               array('insert'=>true, 'fun'=>'dispatch_link'),
+               array('insert'=>true, 'fun'=>'edit_link')));
 
 } elseif ($_POST['order_view_mode'] == 'InvoiceTemplates') {
        array_substitute($cols, 4, 1, _("Description"));
@@ -322,9 +322,9 @@ $table->width = "80%";
 display_db_pager($table);
 submit_center('Update', _("Update"), true, '', null);
 
-if (!@$_GET['popup'])\r
+if (!@$_GET['popup'])
 {
        end_form();
        end_page();
-}\r
+}
 ?>
\ No newline at end of file