Manual

packages.class.php

package class

Usage:

{{lang:php}}
// INITIALIZATION
$package = new packages($DB); // $DB is the object from sql class

// GET PACKAGES
$getPackage = $package->get_package(1); // retreives package by id

// GET PACKAGE ITEMS
$getItems = $package->get_items(1); // retreives package items by package id

// PACKAGES TOTAL PRICES
$total = $package->get_total(1); // get total price amount of selected package
$netto = $package->get_total(1, 'netto'); // get just the total base price of all the items in the package
$vat = $package->get_total(1, 'vat'); // get just the total amount of calculated vat of items
Try myPortal 2: