From f10bbcae2fab1a9346bb0f51d71fdd304d691935 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 29 Jun 2008 21:12:32 +0000 Subject: [PATCH] Added trans_type parameter to items_cart() --- includes/ui/items_cart.inc | 5 +++-- inventory/adjustments.php | 6 +++--- inventory/transfers.php | 7 ++----- manufacturing/work_order_issue.php | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/includes/ui/items_cart.inc b/includes/ui/items_cart.inc index 6a535725..fb2ac021 100644 --- a/includes/ui/items_cart.inc +++ b/includes/ui/items_cart.inc @@ -5,7 +5,7 @@ include_once($path_to_root . "/inventory/includes/inventory_db.inc"); class items_cart { - + var $trans_type; var $line_items; var $gl_items; @@ -24,8 +24,9 @@ class items_cart var $person_id; var $branch_id; - function items_cart() + function items_cart($type) { + $this->trans_type = $type; $this->clear_items(); } diff --git a/inventory/adjustments.php b/inventory/adjustments.php index 2f837fa0..dda848d7 100644 --- a/inventory/adjustments.php +++ b/inventory/adjustments.php @@ -81,7 +81,7 @@ function handle_new_order() session_register("adj_items"); - $_SESSION['adj_items'] = new items_cart; + $_SESSION['adj_items'] = new items_cart(systypes::inventory_adjustment()); $_POST['AdjDate'] = Today(); if (!is_date_in_fiscalyear($_POST['AdjDate'])) $_POST['AdjDate'] = end_fiscalyear(); @@ -247,8 +247,8 @@ echo ""; end_row(); end_table(1); -submit_center_first('Update', _("Update"), '', true); -submit_center_last('Process', _("Process Transfer"), '', true); +submit_center_first('Update', _("Update"), '', null); +submit_center_last('Process', _("Process Adjustment"), '', true); end_form(); end_page(); diff --git a/inventory/transfers.php b/inventory/transfers.php index b76557a0..a17253d5 100644 --- a/inventory/transfers.php +++ b/inventory/transfers.php @@ -79,7 +79,7 @@ function handle_new_order() session_register("transfer_items"); - $_SESSION['transfer_items'] = new items_cart; + $_SESSION['transfer_items'] = new items_cart(systypes::location_transfer()); $_POST['AdjDate'] = Today(); if (!is_date_in_fiscalyear($_POST['AdjDate'])) $_POST['AdjDate'] = end_fiscalyear(); @@ -214,9 +214,6 @@ $id = find_submit('Delete'); if ($id != -1) handle_delete_item($id); -//if (isset($_GET['Delete']) || isset($_GET['Edit'])) -// copy_from_st(); - if (isset($_POST['AddItem']) || isset($_POST['UpdateItem'])) { copy_to_st(); line_start_focus(); @@ -252,7 +249,7 @@ echo ""; end_row(); end_table(1); -submit_center_first('Update', _("Update"), '', true); +submit_center_first('Update', _("Update"), '', null); submit_center_last('Process', _("Process Transfer"), '', true); end_form(); diff --git a/manufacturing/work_order_issue.php b/manufacturing/work_order_issue.php index d2f8e2f0..31269cfc 100644 --- a/manufacturing/work_order_issue.php +++ b/manufacturing/work_order_issue.php @@ -50,7 +50,7 @@ function handle_new_order() Session_register("issue_items"); - $_SESSION['issue_items'] = new items_cart; + $_SESSION['issue_items'] = new items_cart(28); $_SESSION['issue_items']->order_id = $_GET['trans_no']; } -- 2.30.2