<?php
/**********************************************************************
***********************************************************************/
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/ui/items_cart.inc");
include_once($path_to_root . "/projects/includes/db/tasks_db.inc");
include_once($path_to_root . "/projects/includes/db/projects_db.inc");
//--------------------------------------------------------------------------------

function add_to_order(&$order, $new_item, $new_item_qty, $standard_cost, $tran_unit, $tran_qty, $convertion_factor)
{
    $order->add_to_cart (count($order->line_items), $new_item, $new_item_qty, $standard_cost, null, null,null,
                 null, 0, 0, 0, 0, 0, null, 0,null, null,null, null, null,$tran_unit, $tran_qty, 
                 $convertion_factor);
    
    /*
    if ($order->find_cart_item($new_item))
         display_error(_("For Part :") . $new_item . " " . "This item is already on this order.  You can change the quantity ordered of the existing line if necessary.");
	else
         $order->add_to_cart (count($order->line_items), $new_item, $new_item_qty, $standard_cost, null, null,null,
                 null, 0, 0, 0, 0, 0, null, 0,null, null,null, null, null,$tran_unit, $tran_qty, 
                 $convertion_factor);
     * 
     */
}









//---------------------------------------------------------------------------------

?>