diff --git a/app/admin/app-documentation.php b/app/admin/app-documentation.php index cf7ea8a..b260370 100644 --- a/app/admin/app-documentation.php +++ b/app/admin/app-documentation.php @@ -3,200 +3,5 @@ $GLOBALS['page_title'] = $Translation['app documentation']; include(__DIR__ . '/incHeader.php'); -?> -
- -This is the Northwind demo app, showing a sample, relatively sophisticated, app that can be created by AppGini. - -
- -- - - -
- -- -
This is an automatically calculated field that uses this SQL query:
-SELECT SUM(`order_details`.`UnitPrice` * `order_details`.`Quantity` - `order_details`.`Discount`) FROM `customers` -LEFT JOIN `orders` ON `orders`.`CustomerID`=`customers`.`CustomerID` -LEFT JOIN `order_details` ON `orders`.`OrderID`=`order_details`.`OrderID` -WHERE `customers`.`CustomerID`='%ID%'- - -
- - - -
- -- -
This field is Automatically calculated. The SQL query used for calculation is:
- -SELECT FLOOR(DATEDIFF(NOW(), `employees`.`BirthDate`) / 365) FROM `employees` -WHERE `employees`.`EmployeeID`='%ID%'- -
DATEDIFF
returns the difference between 2 dates in days, so we should divide by 365 to get years. Using FLOOR
rounds down age to the nearest year ... That is, if someone is 32.4 years old, her age would display as 32. Also, if someone is 36.9 years old, she'd show as 36 years old since she's, technically, not 37 yet ;)
- -
This field calculates the total sales made by current employee using this SQL query:
- -SELECT SUM(`order_details`.`UnitPrice` * `order_details`.`Quantity` - `order_details`.`Discount`) FROM `employees` -LEFT JOIN `orders` ON `orders`.`EmployeeID`=`employees`.`EmployeeID` -LEFT JOIN `order_details` ON `orders`.`OrderID`=`order_details`.`OrderID` -WHERE `employees`.`EmployeeID`='%ID%'- - -
- - - -
- -- -
This is a calculated field based on the following SQL query
-SELECT -IF( - `orders`.`ShippedDate`, - '<span class="text-success">Shipped</span>', - /* else */ - IF( - `orders`.`RequiredDate` < now(), - '<span class="text-danger">Late</span>', - /* else */ - '<span class="text-warning">Pending</span>' - ) -) -FROM `orders` -WHERE `orders`.`OrderID`='%ID%'-
For late orders, a Late status would be displayed. -For orders not yet shipped, but not late, a Pending status would be displayed. -And for shipped orders, Shipped will be displayed.
- - -- -
This field is automatically calculated using the following SQL query:
-SELECT SUM(`order_details`.`UnitPrice` * `order_details`.`Quantity`) + `orders`.`Freight` FROM `orders` -LEFT JOIN `order_details` ON `order_details`.`OrderID`=`orders`.`OrderID` -WHERE `orders`.`OrderID`='%ID%'- - -
- - - -
- -- -
This field is automatically calculated using the following query:
- -SELECT `order_details`.`UnitPrice` * `order_details`.`Quantity` - `order_details`.`Discount` FROM `order_details` -WHERE `order_details`.`odID`='%ID%'- -
The formula above calculates the subtotal of this invoice line by multiplying unit price by quantity and then subtracting discount amount.
- - -- - - -
- -- -
This field is Automatically calculated. The SQL query used is:
- -SELECT COUNT(1) FROM `shippers` -LEFT JOIN `orders` ON `orders`.`ShipVia`=`shippers`.`ShipperID` -WHERE `shippers`.`ShipperID`='%ID%'- - -