require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
require_once '../functions-xml.php';
tep_db_connect();
define('FPDF_IMGPATH', DIR_WS_IMAGES . 'pdf/');
define('FPDF_FONTPATH', FPDF_IMGPATH . 'fonts/');
use_class('fpdf', DIR_WS_CLASSES);
use_class('minierp_logistic');
$class_ml = new minierp_logistic();
if (isset($_GET['logistic_id']) && $_GET['logistic_id'] != '') {
    $logistic_id = tep_db_prepare_input($_GET['logistic_id']);
    $use_cogs = isset($_GET['use_cogs']);
    $log_data = $class_ml->retrieveDetail($logistic_id);
    $log_date = strtotime($log_data['logistic_date']);
    $class_ml->PTBRetrieveContents($logistic_id, $use_cogs);
    //    $class_ml->PTBcalcContents($logistic_id);
    $cat_total = $class_ml->ptb_cat_total;
    $products = $class_ml->ptb_products;
} else {
    exit;
}
class PDF extends FPDF
{
    var $left_margin;
    var $top_margin;
    var $page_width;
    var $page_height;
    var $font_type;
    var $font_size;
    var $line_height;