Fix for bringing customer to view invoice that doesn't exist after downgrade
This commit is contained in:
parent
7de507c99a
commit
278ca264eb
1 changed files with 6 additions and 1 deletions
|
@ -164,8 +164,13 @@ class BillingController extends Zend_Controller_Action {
|
||||||
if ($apply_vat) {
|
if ($apply_vat) {
|
||||||
Billing::addVatToInvoice($result["invoiceid"]);
|
Billing::addVatToInvoice($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"]);
|
self::viewInvoice($result["invoiceid"]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue