Fix for bringing customer to view invoice that doesn't exist after downgrade
This commit is contained in:
parent
7de507c99a
commit
278ca264eb
|
@ -164,7 +164,12 @@ class BillingController extends Zend_Controller_Action {
|
||||||
if ($apply_vat) {
|
if ($apply_vat) {
|
||||||
Billing::addVatToInvoice($result["invoiceid"]);
|
Billing::addVatToInvoice($result["invoiceid"]);
|
||||||
}
|
}
|
||||||
self::viewInvoice($result["invoiceid"]);
|
|
||||||
|
// invoice id can be 0 if client is downgrading and they don't
|
||||||
|
// owe any money
|
||||||
|
if (!empty($result["invoiceid"])) {
|
||||||
|
self::viewInvoice($result["invoiceid"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
|
Loading…
Reference in New Issue