Added Address Invoice view
This commit is contained in:
@@ -140,6 +140,29 @@ class AddressController extends mfBaseController {
|
||||
$this->redirect("Address");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected function invoiceAction() {
|
||||
$this->layout()->setTemplate("Address/invoice");
|
||||
|
||||
$address_id = $this->request->address_id;
|
||||
if(!is_numeric($address_id) || $address_id < 1) {
|
||||
$this->layout()->setFlash("Addresse nicht gefunden", "error");
|
||||
$this->redirect("Address");
|
||||
}
|
||||
|
||||
$address = new Address($address_id);
|
||||
if(!$address->id) {
|
||||
$this->layout()->setFlash("Addresse nicht gefunden", "error");
|
||||
$this->redirect("Address");
|
||||
}
|
||||
|
||||
$invoices = InvoiceModel::search(["owner_or_billingaddress_id" => $address->id], false, "invoice_date DESC");
|
||||
$this->layout()->set("invoices", $invoices);
|
||||
$this->layout()->set("address", $address);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected function editAction() {
|
||||
|
||||
Reference in New Issue
Block a user