<?php

use app\libraries\CommonHelper;
use app\libraries\DateHelper;

defined('BASEPATH') or exit('No direct script access allowed');

require  __DIR__ . '/invoicing_read.php';

class Invoicing_void extends Invoicing_read
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index($invoiceId)
    {
        $this->Invoice_model->void($invoiceId);
        $this->_data['__alert_success_message'] = '修改成功。此發票的狀態變為 void.';

        return parent::index($invoiceId);
    }
}
