0
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.
Thanks
Alex
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.
Thanks
Alex
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »