diff --git a/controllers/line_items_controller.php b/controllers/line_items_controller.php
index 9e141644..1b22f29f 100644
--- a/controllers/line_items_controller.php
+++ b/controllers/line_items_controller.php
@@ -83,7 +83,10 @@ class LineItemsController extends AppController {
/* Copy all the data from the Product to the new LineItem */
$this->data['LineItem']['description'] = $product['Product']['description'];
- $this->data['LineItem']['title'] = $product['Product']['title'];
+
+
+
+ $this->data['LineItem']['title'] = $product['Product']['title'];
}
diff --git a/models/country.php b/models/country.php
index a82d126d..1b3240dd 100755
--- a/models/country.php
+++ b/models/country.php
@@ -3,6 +3,8 @@ class Country extends AppModel {
var $name = 'Country';
+ var $order = "Country.name ASC";
+
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $belongsTo = array(
'Currency' => array('className' => 'Currency',
diff --git a/vendors/xtcpdf.php b/vendors/xtcpdf.php
index 16ba69da..810ca1ab 100755
--- a/vendors/xtcpdf.php
+++ b/vendors/xtcpdf.php
@@ -357,8 +357,14 @@ class XTCPDF extends TCPDF {
foreach($page as $productID) {
$product = array_shift($products);
- $fullDesc = "".$product['Principle']['name']."
"."".$product[$docType]['title'].'
'.$product[$docType]['description'];
+ if($product['Principle']['id'] != null) {
+ $fullDesc = "".$product['Principle']['name']."
"."".$product[$docType]['title'].'
'.$product[$docType]['description'];
+ }
+ else {
+ $fullDesc = "".$product[$docType]['title'].'
'.$product[$docType]['description'];
+ }
+
if($product[$docType]['option'] == 1) {
$options = 1;
}
@@ -541,13 +547,6 @@ ENDHTMLCONTENTS;
}
- function termsAndConditions() {
-
-
-
-
-
- }
function totals($currency, $subTotal, $gst, $options) {