<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;

class bills_SINGLE_Controller extends Controller
{
    public $selfName = 'bills_SINGLE_Controller';

	// GET /bills/view/{uid}/ACTION_payHcpAmount
	public function ACTION_payHcpAmount(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		return view('pro/bills_SINGLE/ACTION_payHcpAmount', compact('record'));
	}

	// GET /bills/view/{uid}/ACTION_payHcpDifferentAmount
	public function ACTION_payHcpDifferentAmount(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		return view('pro/bills_SINGLE/ACTION_payHcpDifferentAmount', compact('record'));
	}

	// GET /bills/view/{uid}/ACTION_signAsHcp
	public function ACTION_signAsHcp(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		return view('pro/bills_SINGLE/ACTION_signAsHcp', compact('record'));
	}

	// GET /bills/view/{uid}/ACTION_markSubmitted
	public function ACTION_markSubmitted(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		return view('pro/bills_SINGLE/ACTION_markSubmitted', compact('record'));
	}

	// GET /bills/view/{uid}/ACTION_putCollectedAmount
	public function ACTION_putCollectedAmount(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		return view('pro/bills_SINGLE/ACTION_putCollectedAmount', compact('record'));
	}

	// GET /bills/view/{uid}/SUB_dashboard
	public function SUB_dashboard(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		return view('pro/bills_SINGLE/SUB_dashboard', compact('record'));
	}

	// GET /bills/view/{uid}/SUB_transactions
	public function SUB_transactions(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		$subRecords = DB::table('pro_transaction')->where('bill_id', $record->id)->get();
		return view('pro/bills_SINGLE/SUB_transactions', compact('record', 'subRecords'));
	}

	// GET /bills/view/{uid}/SUB_audit_log
	public function SUB_audit_log(Request $request, $uid) {
		$record = DB::table('bill')->where('uid', $uid)->first();
		return view('pro/bills_SINGLE/SUB_audit_log', compact('record'));
	}
}
