0003961: Undefined variables used during journal modify (tax included)
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 Jul 2017 10:57:08 +0000 (12:57 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 Jul 2017 10:57:08 +0000 (12:57 +0200)
gl/gl_journal.php
purchasing/includes/db/grn_db.inc

index e057d0989563d63c01369e20b4a17b4bbf7bca64..34abbedfabb4175acdf4ee1f7307d4ea2f513f15 100644 (file)
@@ -140,8 +140,8 @@ function create_cart($type=0, $trans_no=0)
                {
                        $tax_id = $detail['tax_type_id'];
                        $tax_info['net_amount'][$tax_id] = $detail['net_amount']; // we can two records for the same tax_id, but in this case net_amount is the same
-                       $tax_info['tax_date'] = sql2date($detail['effective_date']);
-                       $tax_info['tax_group'] = $detail['tax_group_id'];
+                       $tax_info['tax_date'] = sql2date($detail['tran_date']);
+                       //$tax_info['tax_group'] = $detail['tax_group_id'];
 
                }
                if (isset($tax_info['net_amount']))     // guess exempt sales/purchase if any tax has been found
@@ -316,7 +316,7 @@ if (isset($_POST['Process']))
        {
                // complete tax register data
                $cart->tax_info['tax_date'] = $_POST['tax_date'];
-               $cart->tax_info['tax_group'] = $_POST['tax_group'];
+               //$cart->tax_info['tax_group'] = $_POST['tax_group'];
                $taxes = get_all_tax_types();
                while ($tax = db_fetch($taxes))
                {
@@ -467,7 +467,7 @@ if (tab_closed('tabs', 'gl'))
 {
        $cart = &$_SESSION['journal_items'];
        $cart->tax_info['tax_date'] = $_POST['tax_date'];
-       $cart->tax_info['tax_group'] = $_POST['tax_group'];
+       //$cart->tax_info['tax_group'] = $_POST['tax_group'];
        $taxes = get_all_tax_types();
        while ($tax = db_fetch($taxes))
        {
@@ -536,10 +536,12 @@ tabbed_content_start('tabs', array(
 
                case 'tax':
                        update_tax_info();
+                       br();
                        display_heading(_("Tax register record"));
+                       br();
                        start_table(TABLESTYLE2, "width=40%");
                        date_row(_("VAT date:"), 'tax_date', '', "colspan='3'");
-                       tax_groups_list_row(_("Tax group:"), 'tax_group');
+                       //tax_groups_list_row(_("Tax group:"), 'tax_group');
                        end_table(1);
 
                        start_table(TABLESTYLE2, "width=60%");
index 832787d05fac080a0af86845073070bb17e10ce6..49e4dcd23ef8f2ca1f215271f28e19eb6d6b267f 100644 (file)
@@ -140,9 +140,6 @@ function add_grn(&$po)
 
                        $po->line_items[$line_no]->grn_item_id = $grn_item;
                        /* 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_value($po)/$order_line->receive_qty);
                        add_stock_move(ST_SUPPRECEIVE, $order_line->stock_id, $grn, $po->Location, $date_, "",
                                $order_line->receive_qty, $order_line->standard_cost, $order_line->taxfree_charge_value($po)/$order_line->receive_qty);