Public Member Functions |
| | __construct ($id=0) |
| | __get ($key) |
| | __set ($key, $value) |
| | addItem ($item) |
| | addRenewal ($purchase, $price=NULL, $expire=NULL) |
| | adjustTax ($k, $percentage) |
| | calculateTax ($country, $state) |
| | chargeToCard () |
| | getLinePrice ($k) |
|
| getOrderProgress () |
| | getPurchases () |
| | markPaid () |
| | markUnpaid ($infoOnly, $status='canc') |
| | recalculateTotal () |
| | removeItem ($id) |
| | save ($system=FALSE, $log=TRUE) |
| | sendNotification ($key, $member=0, $extra=NULL) |
| | setQuantity ($_item, $quantity) |
| | setShipping ($item, $method) |
Static Public Member Functions |
| static | formatPrices ($prices) |
Data Fields |
| | $takeAction = TRUE |
| const | OS_BILLING = 1 |
|
const | OS_SHIPPING = 2 |
Constructor & Destructor Documentation
Constructor
- Parameters:
-
| int|null | Provide ID number to load existing invoice, or null to create new |
- Returns:
- bool
Member Function Documentation
Get data
- Parameters:
-
- Returns:
- string data
Set data
- Parameters:
-
- Returns:
- bool
| addRenewal |
( |
$ |
purchase, |
|
|
$ |
price = NULL, |
|
|
$ |
expire = NULL |
|
) |
| |
Add Renewal
- Parameters:
-
| array | Row from nexus_purchases |
| float|null | Price override |
Adjust Tax
- Parameters:
-
| int | Item number |
| int | Percentage of current tax to take |
Calculate Tax
- Parameters:
-
| string | Country code |
| string | State code |
Charge To Card
- Returns:
- void
- Exceptions:
-
Format Prices Takes an array of prices and quantities and formats for display
Get Line Price
- Parameters:
-
Get purchases
- Returns:
- array Items from nexus_purchases
Mark as paid Generates purchases, updates renewal dates, etc.
- Parameters:
-
| bool | Whether or not to save the invoice. Unless done after calling function, should be true. |
Mark Unpaid
- Parameters:
-
| bool | $infoOnly | If true, won't actually make changes |
| string | $status | The status we're setting it to |
- Returns:
- array Information about changes
| save |
( |
$ |
system = FALSE, |
|
|
$ |
log = TRUE |
|
) |
| |
Send Notification
- Parameters:
-
| string | Notification key |
| id | Member ID if not invoice ownwe |
Set Quantity
- Parameters:
-
- Returns:
- array 'line' => Line price, 'prices' => see self::formatPrices
Set Shipping Method
- Parameters:
-
| int | Item |
| int | Shipping Method |
Field Documentation
Take Action If false, markAsPaid() etc, will not be ran
Get Order Progress
- Returns:
- array Array with steps
The documentation for this class was generated from the following file:
- admin/applications_addon/ips/nexus/sources/invoiceModel.php