<?php
namespace app\index\controller;
use think\facade\View;
use think\facade\Session;
use app\common\controller\Invoice as InvoiceController;
class Invoice extends Base
{
	public function saveInvoiceTitle()
	{
        $User=Session::get('User');
        if ($User['role_type']){
            if (request()->isAjax()) {
            	$D=request()->post();
            	$D['uid']=$User['id'];
                return InvoiceController::saveInvoiceTitle($D);
            }
            return View::fetch('company_invoice');
        }else{
            return View::fetch('personal_invoice');
        }
	}
    public function applyInvoice()
    {
        $User=Session::get('User');
        if (request()->post()) {
            $D=request()->post();
            $D['uid']=$User['id'];
            return InvoiceController::applyInvoice($D);
        }
    }
}
