Hi Germinal,

Was playing around with the code after installing the latest com_invoices yesterday and found a missing method function in the model since $this->quotes[$i]->subtotal (and total) from the view/tpl was not displaying anything other than 0.
I realized that it wasn't set. I changed model/invoices.php getQuotes() as this:

function getQuotes(){
if (empty( $this->quotes )) {
$query = $this->_buildQuery(2);

$this->quotes = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));

for($i = 0; $i < count($this->quotes) ; $i++){
$this->quotes[$i]->subtotal = InvoicesHelper::get_subtotal($this->quotes[$i]->id);

$this->quotes[$i]->total = InvoicesHelper::get_total($this->quotes[$i]);
return $this->quotes;

This fixed the issue.
Can you update the code for next version.


Responses (1)
  • Accepted Answer

    Tuesday, July 08 2014, 10:02 AM - #Permalink
    thanks Alex, you are absolutely right.
    I've re-packed the extension (still version 1.3.1) with the fix, also I added the fix for the strange character that you mention in the other post.
    The reply is currently minimized Show
Your Reply