done task
This commit is contained in:
parent
e07a16457b
commit
96af24a1cf
@ -4,6 +4,8 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\helper\helperController;
|
||||
use App\Models\transaksi;
|
||||
use Barryvdh\DomPDF\Facade\Pdf as FacadePdf;
|
||||
use Barryvdh\DomPDF\PDF;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TransaksiController extends Controller
|
||||
@ -108,4 +110,14 @@ class TransaksiController extends Controller
|
||||
public function datatable(){
|
||||
return transaksi::where('is_delete', false)->get();
|
||||
}
|
||||
|
||||
public function invoice(string $uid){
|
||||
$transaksi = transaksi::where('uid', $uid)->first();
|
||||
$data = [
|
||||
'transaksi' => $transaksi
|
||||
];
|
||||
$pdf = FacadePdf::loadview('transaksi.invoice', $data);
|
||||
return $pdf->stream('Invoice-'.$transaksi->uid.'.pdf');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\asuransi;
|
||||
use App\Models\patient;
|
||||
use App\Models\roomService;
|
||||
use App\Models\transaksi;
|
||||
@ -11,24 +12,56 @@ use Spatie\FlareClient\View;
|
||||
|
||||
class dashboardController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
$now = Carbon::now();
|
||||
$pasien = patient::where('is_delete', false)->count();
|
||||
$totalRuangan_pelayanan = roomService::where('is_delete', false)->count();
|
||||
$data = transaksi::selectRaw('COUNT(*) as total_transaksi, SUM(price) as total_harga')
|
||||
->whereDate('created_at', $now)->where('is_delete', false)
|
||||
->first();
|
||||
public function index(Request $request){
|
||||
$filter = $request->filter ?? 'today'; // default hari ini
|
||||
$startDate = null;
|
||||
$endDate = null;
|
||||
|
||||
$jumlahTransaksiHariIni = $data->total_transaksi;
|
||||
$totalHargaTransaksiHariIni = $data->total_harga;
|
||||
if ($filter == 'today') {
|
||||
$startDate = Carbon::today();
|
||||
$endDate = Carbon::today();
|
||||
} elseif ($filter == 'yesterday') {
|
||||
$startDate = Carbon::yesterday();
|
||||
$endDate = Carbon::yesterday();
|
||||
} elseif ($filter == '7days') {
|
||||
$startDate = Carbon::now()->subDays(6);
|
||||
$endDate = Carbon::today();
|
||||
} elseif ($filter == '30days') {
|
||||
$startDate = Carbon::now()->subDays(29);
|
||||
$endDate = Carbon::today();
|
||||
} elseif ($filter == 'this_month') {
|
||||
$startDate = Carbon::now()->startOfMonth();
|
||||
$endDate = Carbon::now()->endOfMonth();
|
||||
} elseif ($filter == 'custom' && $request->start_date && $request->end_date) {
|
||||
$startDate = Carbon::parse($request->start_date);
|
||||
$endDate = Carbon::parse($request->end_date);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'title' => 'Dashboard',
|
||||
'total_pasien' => $pasien,
|
||||
'total_rp' => $totalRuangan_pelayanan,
|
||||
'trx_today' => $jumlahTransaksiHariIni,
|
||||
'trx_nominal' => $totalHargaTransaksiHariIni,
|
||||
];
|
||||
return view('dashboard.index', $data);
|
||||
// Query transaksi berdasarkan range tanggal
|
||||
$query = Transaksi::where('is_delete', false);
|
||||
if ($startDate && $endDate) {
|
||||
$query->whereBetween('created_at', [$startDate->startOfDay(), $endDate->endOfDay()]);
|
||||
}
|
||||
|
||||
$trx_today = $query->count();
|
||||
$trx_nominal = $query->sum('price');
|
||||
|
||||
$transaksi = $query->limit(5)->get();
|
||||
|
||||
// Data tambahan
|
||||
$total_rp = RoomService::where('is_delete', false)->count();
|
||||
$asuransi = Asuransi::where('is_delete', false)->count();
|
||||
$pasien = Patient::where('is_delete', false)->count();
|
||||
$data =[
|
||||
'title' => 'Dashboard',
|
||||
'trx_today' => $trx_today,
|
||||
'trx_nominal' => $trx_nominal,
|
||||
'asuransi' => $asuransi,
|
||||
'pasien' => $pasien,
|
||||
'total_rp'=>$total_rp,
|
||||
'transaksi' => $transaksi
|
||||
];
|
||||
|
||||
return view('dashboard.index', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"barryvdh/laravel-dompdf": "^3.1",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"laravel/framework": "^10.0",
|
||||
"laravel/sanctum": "^3.2",
|
||||
|
||||
366
composer.lock
generated
366
composer.lock
generated
@ -4,8 +4,85 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "bfe12996eeecb6fdc8713a9fd9d431f8",
|
||||
"content-hash": "86a14aa92091a590b7523b8dfa7ba6d0",
|
||||
"packages": [
|
||||
{
|
||||
"name": "barryvdh/laravel-dompdf",
|
||||
"version": "v3.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-dompdf.git",
|
||||
"reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d",
|
||||
"reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dompdf/dompdf": "^3.0",
|
||||
"illuminate/support": "^9|^10|^11|^12",
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"larastan/larastan": "^2.7|^3.0",
|
||||
"orchestra/testbench": "^7|^8|^9|^10",
|
||||
"phpro/grumphp": "^2.5",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"PDF": "Barryvdh\\DomPDF\\Facade\\Pdf",
|
||||
"Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf"
|
||||
},
|
||||
"providers": [
|
||||
"Barryvdh\\DomPDF\\ServiceProvider"
|
||||
]
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Barryvdh\\DomPDF\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Barry vd. Heuvel",
|
||||
"email": "barryvdh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A DOMPDF Wrapper for Laravel",
|
||||
"keywords": [
|
||||
"dompdf",
|
||||
"laravel",
|
||||
"pdf"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-dompdf/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-dompdf/tree/v3.1.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://fruitcake.nl",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/barryvdh",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-13T15:07:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brick/math",
|
||||
"version": "0.12.3",
|
||||
@ -378,6 +455,161 @@
|
||||
],
|
||||
"time": "2024-02-05T11:56:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/dompdf",
|
||||
"version": "v3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dompdf/dompdf.git",
|
||||
"reference": "a51bd7a063a65499446919286fb18b518177155a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/a51bd7a063a65499446919286fb18b518177155a",
|
||||
"reference": "a51bd7a063a65499446919286fb18b518177155a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dompdf/php-font-lib": "^1.0.0",
|
||||
"dompdf/php-svg-lib": "^1.0.0",
|
||||
"ext-dom": "*",
|
||||
"ext-mbstring": "*",
|
||||
"masterminds/html5": "^2.0",
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-gd": "*",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"mockery/mockery": "^1.3",
|
||||
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gd": "Needed to process images",
|
||||
"ext-gmagick": "Improves image processing performance",
|
||||
"ext-imagick": "Improves image processing performance",
|
||||
"ext-zlib": "Needed for pdf stream compression"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Dompdf\\": "src/"
|
||||
},
|
||||
"classmap": [
|
||||
"lib/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "The Dompdf Community",
|
||||
"homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
|
||||
}
|
||||
],
|
||||
"description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
|
||||
"homepage": "https://github.com/dompdf/dompdf",
|
||||
"support": {
|
||||
"issues": "https://github.com/dompdf/dompdf/issues",
|
||||
"source": "https://github.com/dompdf/dompdf/tree/v3.1.0"
|
||||
},
|
||||
"time": "2025-01-15T14:09:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/php-font-lib",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dompdf/php-font-lib.git",
|
||||
"reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d",
|
||||
"reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"FontLib\\": "src/FontLib"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "The FontLib Community",
|
||||
"homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md"
|
||||
}
|
||||
],
|
||||
"description": "A library to read, parse, export and make subsets of different types of font files.",
|
||||
"homepage": "https://github.com/dompdf/php-font-lib",
|
||||
"support": {
|
||||
"issues": "https://github.com/dompdf/php-font-lib/issues",
|
||||
"source": "https://github.com/dompdf/php-font-lib/tree/1.0.1"
|
||||
},
|
||||
"time": "2024-12-02T14:37:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/php-svg-lib",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dompdf/php-svg-lib.git",
|
||||
"reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/eb045e518185298eb6ff8d80d0d0c6b17aecd9af",
|
||||
"reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": "^7.1 || ^8.0",
|
||||
"sabberworm/php-css-parser": "^8.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Svg\\": "src/Svg"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "The SvgLib Community",
|
||||
"homepage": "https://github.com/dompdf/php-svg-lib/blob/master/AUTHORS.md"
|
||||
}
|
||||
],
|
||||
"description": "A library to read, parse and export to PDF SVG files.",
|
||||
"homepage": "https://github.com/dompdf/php-svg-lib",
|
||||
"support": {
|
||||
"issues": "https://github.com/dompdf/php-svg-lib/issues",
|
||||
"source": "https://github.com/dompdf/php-svg-lib/tree/1.0.0"
|
||||
},
|
||||
"time": "2024-04-29T13:26:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dragonmantank/cron-expression",
|
||||
"version": "v3.4.0",
|
||||
@ -1889,6 +2121,73 @@
|
||||
],
|
||||
"time": "2024-09-21T08:32:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
"version": "2.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Masterminds/html5-php.git",
|
||||
"reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
|
||||
"reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.7-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Masterminds\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Matt Butcher",
|
||||
"email": "technosophos@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Matt Farina",
|
||||
"email": "matt@mattfarina.com"
|
||||
},
|
||||
{
|
||||
"name": "Asmir Mustafic",
|
||||
"email": "goetas@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "An HTML5 parser and serializer.",
|
||||
"homepage": "http://masterminds.github.io/html5-php",
|
||||
"keywords": [
|
||||
"HTML5",
|
||||
"dom",
|
||||
"html",
|
||||
"parser",
|
||||
"querypath",
|
||||
"serializer",
|
||||
"xml"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Masterminds/html5-php/issues",
|
||||
"source": "https://github.com/Masterminds/html5-php/tree/2.9.0"
|
||||
},
|
||||
"time": "2024-03-31T07:05:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "3.9.0",
|
||||
@ -3168,6 +3467,71 @@
|
||||
],
|
||||
"time": "2024-04-27T21:32:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sabberworm/php-css-parser",
|
||||
"version": "v8.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
|
||||
"reference": "3de493bdddfd1f051249af725c7e0d2c38fed740"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/3de493bdddfd1f051249af725c7e0d2c38fed740",
|
||||
"reference": "3de493bdddfd1f051249af725c7e0d2c38fed740",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-iconv": "*",
|
||||
"php": "^5.6.20 || ^7.0.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "for parsing UTF-8 CSS"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "9.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Sabberworm\\CSS\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Raphael Schweikert"
|
||||
},
|
||||
{
|
||||
"name": "Oliver Klee",
|
||||
"email": "github@oliverklee.de"
|
||||
},
|
||||
{
|
||||
"name": "Jake Hotson",
|
||||
"email": "jake.github@qzdesign.co.uk"
|
||||
}
|
||||
],
|
||||
"description": "Parser for CSS Files written in PHP",
|
||||
"homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
|
||||
"keywords": [
|
||||
"css",
|
||||
"parser",
|
||||
"stylesheet"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
|
||||
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.8.0"
|
||||
},
|
||||
"time": "2025-03-23T17:59:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v6.4.20",
|
||||
|
||||
254
database_results.sql
Normal file
254
database_results.sql
Normal file
@ -0,0 +1,254 @@
|
||||
-- --------------------------------------------------------
|
||||
-- Host: 127.0.0.1
|
||||
-- Server version: 8.0.30 - MySQL Community Server - GPL
|
||||
-- Server OS: Win64
|
||||
-- HeidiSQL Version: 12.1.0.6537
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
|
||||
-- Dumping database structure for task_rsbhak
|
||||
CREATE DATABASE IF NOT EXISTS `task_rsbhak` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
|
||||
USE `task_rsbhak`;
|
||||
|
||||
-- Dumping structure for table task_rsbhak.asuransis
|
||||
CREATE TABLE IF NOT EXISTS `asuransis` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `asuransis_uid_unique` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.asuransis: ~9 rows (approximately)
|
||||
INSERT IGNORE INTO `asuransis` (`id`, `uid`, `name`, `is_delete`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'KedISANwDmhQ4A', 'BPJS', 0, '2025-04-27 00:36:13', '2025-04-27 04:25:33'),
|
||||
(22, 'eVw2L9fkyP-ZXg', 'AIA', 0, '2025-04-27 04:31:13', '2025-04-27 04:31:13'),
|
||||
(23, '0uNEhkYLfPEv6g', 'test', 1, '2025-04-27 06:01:41', '2025-04-27 06:01:43');
|
||||
|
||||
-- Dumping structure for table task_rsbhak.failed_jobs
|
||||
CREATE TABLE IF NOT EXISTS `failed_jobs` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.failed_jobs: ~0 rows (approximately)
|
||||
|
||||
-- Dumping structure for table task_rsbhak.migrations
|
||||
CREATE TABLE IF NOT EXISTS `migrations` (
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`batch` int NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.migrations: ~0 rows (approximately)
|
||||
INSERT IGNORE INTO `migrations` (`id`, `migration`, `batch`) VALUES
|
||||
(2, '2014_10_12_100000_create_password_reset_tokens_table', 1),
|
||||
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
|
||||
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
|
||||
(5, '2014_10_12_000000_create_users_table', 2),
|
||||
(6, '2025_04_27_072551_create_asuransis_table', 3),
|
||||
(7, '2025_04_27_075631_create_room_services_table', 4),
|
||||
(8, '2025_04_27_085339_create_services_table', 5),
|
||||
(10, '2025_04_27_094307_create_patients_table', 6),
|
||||
(12, '2025_04_27_124513_create_registrasi_pasiens_table', 7),
|
||||
(15, '2025_04_27_142732_create_transaksis_table', 8);
|
||||
|
||||
-- Dumping structure for table task_rsbhak.password_reset_tokens
|
||||
CREATE TABLE IF NOT EXISTS `password_reset_tokens` (
|
||||
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`email`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.password_reset_tokens: ~0 rows (approximately)
|
||||
|
||||
-- Dumping structure for table task_rsbhak.patients
|
||||
CREATE TABLE IF NOT EXISTS `patients` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`birth` date NOT NULL,
|
||||
`gender` enum('Laki-Laki','Perempuan') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `patients_uid_unique` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.patients: ~3 rows (approximately)
|
||||
INSERT IGNORE INTO `patients` (`id`, `uid`, `name`, `birth`, `gender`, `is_delete`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'pHvvkA-0jYATHA', 'pasien 2', '1998-03-12', 'Perempuan', 0, '2025-04-27 03:41:17', '2025-04-27 06:05:07'),
|
||||
(2, 'b4vySdqXcTYmWw', 'Pasien 2', '2000-12-12', 'Laki-Laki', 1, '2025-04-27 03:41:33', '2025-04-27 03:44:44'),
|
||||
(3, 'Xi0_S5LCE1vsAg', 'Pasien 3', '2025-04-12', 'Perempuan', 1, '2025-04-27 03:41:47', '2025-04-27 03:44:41'),
|
||||
(4, 'UdspOTiN33l_ng', 'Tio', '1998-08-12', 'Laki-Laki', 0, '2025-04-27 05:42:55', '2025-04-27 05:42:55'),
|
||||
(5, 'Zs6volqlJ-VW4g', 'Pasien 3', '2000-02-12', 'Laki-Laki', 0, '2025-04-27 06:02:29', '2025-04-27 06:02:29');
|
||||
|
||||
-- Dumping structure for table task_rsbhak.personal_access_tokens
|
||||
CREATE TABLE IF NOT EXISTS `personal_access_tokens` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`tokenable_id` bigint unsigned NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`abilities` text COLLATE utf8mb4_unicode_ci,
|
||||
`last_used_at` timestamp NULL DEFAULT NULL,
|
||||
`expires_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
|
||||
KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.personal_access_tokens: ~0 rows (approximately)
|
||||
|
||||
-- Dumping structure for table task_rsbhak.registrasi_pasiens
|
||||
CREATE TABLE IF NOT EXISTS `registrasi_pasiens` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`pasien_uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`asuransi_uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`no_card_asuransi` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`pegawai_uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`date_regist` datetime DEFAULT NULL,
|
||||
`ruang_pelayanan_uid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `registrasi_pasiens_uid_unique` (`uid`),
|
||||
KEY `registrasi_pasiens_pasien_uid_foreign` (`pasien_uid`),
|
||||
KEY `registrasi_pasiens_asuransi_uid_foreign` (`asuransi_uid`),
|
||||
KEY `registrasi_pasiens_pegawai_uid_foreign` (`pegawai_uid`),
|
||||
KEY `registrasi_pasiens_ruang_pelayanan_uid_foreign` (`ruang_pelayanan_uid`),
|
||||
CONSTRAINT `registrasi_pasiens_asuransi_uid_foreign` FOREIGN KEY (`asuransi_uid`) REFERENCES `asuransis` (`uid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `registrasi_pasiens_pasien_uid_foreign` FOREIGN KEY (`pasien_uid`) REFERENCES `patients` (`uid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `registrasi_pasiens_pegawai_uid_foreign` FOREIGN KEY (`pegawai_uid`) REFERENCES `users` (`uid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `registrasi_pasiens_ruang_pelayanan_uid_foreign` FOREIGN KEY (`ruang_pelayanan_uid`) REFERENCES `room_services` (`uid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.registrasi_pasiens: ~0 rows (approximately)
|
||||
INSERT IGNORE INTO `registrasi_pasiens` (`id`, `uid`, `pasien_uid`, `asuransi_uid`, `no_card_asuransi`, `pegawai_uid`, `date_regist`, `ruang_pelayanan_uid`, `is_delete`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'bqwXdVAbLYYlDA', 'pHvvkA-0jYATHA', 'KedISANwDmhQ4A', 'sadf', 'Da5sqbcopPFZCQ', NULL, 'T_pPy_MoCu_c8g', 0, '2025-04-27 06:56:13', '2025-04-27 07:26:53'),
|
||||
(2, 'ukI1-3XN2YOR2Q', 'Zs6volqlJ-VW4g', 'KedISANwDmhQ4A', '1234567', 'Da5sqbcopPFZCQ', NULL, 'J18nY_QqEwjY8w', 0, '2025-04-27 07:38:55', '2025-04-27 07:38:55');
|
||||
|
||||
-- Dumping structure for table task_rsbhak.room_services
|
||||
CREATE TABLE IF NOT EXISTS `room_services` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `room_services_uid_unique` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.room_services: ~9 rows (approximately)
|
||||
INSERT IGNORE INTO `room_services` (`id`, `uid`, `name`, `is_delete`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'MJuDzk8QFrHNKA', 'test', 1, '2025-04-27 01:12:40', '2025-04-27 01:20:31'),
|
||||
(2, 'jqbeJUPnQmbWUQ', 'teadfsadf', 1, '2025-04-27 01:12:40', '2025-04-27 01:20:28'),
|
||||
(3, 'wRXtMmPlIb8s1g', 'asdfasdfasfdsa', 1, '2025-04-27 01:12:40', '2025-04-27 01:20:25'),
|
||||
(4, 'x5b4Qp24K-rnGQ', 'Ruangan Dokter Gigi', 0, '2025-04-27 01:13:37', '2025-04-27 01:19:06'),
|
||||
(5, 'EoFMagnFPrFlRA', 'asdfafdasd', 1, '2025-04-27 01:13:37', '2025-04-27 01:19:10'),
|
||||
(6, 'I3zKdpiI87Bt6A', 'adfasdf', 1, '2025-04-27 01:13:37', '2025-04-27 01:20:22'),
|
||||
(7, 'J18nY_QqEwjY8w', 'Ruangan Dokter Anak', 0, '2025-04-27 01:13:37', '2025-04-27 01:20:17'),
|
||||
(8, 'T_pPy_MoCu_c8g', 'Ruangan Radiologi', 0, '2025-04-27 01:13:50', '2025-04-27 01:19:55'),
|
||||
(9, 'Pajky6cguQnYJw', 'test', 1, '2025-04-27 01:20:44', '2025-04-27 01:20:49'),
|
||||
(10, 'IA4fljdqxJXxRg', 'Ruangan Dokter Umum', 0, '2025-04-27 04:25:50', '2025-04-27 04:25:50'),
|
||||
(11, '9D8gqB8XXdnrKQ', 'teasdfasfasf', 1, '2025-04-27 06:01:48', '2025-04-27 06:01:53');
|
||||
|
||||
-- Dumping structure for table task_rsbhak.services
|
||||
CREATE TABLE IF NOT EXISTS `services` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`tarif` bigint unsigned NOT NULL,
|
||||
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `services_uid_unique` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.services: ~5 rows (approximately)
|
||||
INSERT IGNORE INTO `services` (`id`, `uid`, `name`, `tarif`, `is_delete`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'G3HmhGeag4JwFA', 'data 1', 20000, 1, '2025-04-27 02:30:58', '2025-04-27 04:26:48'),
|
||||
(2, '8Jk-P910QSEZvw', 'Surat Sehat', 20000, 0, '2025-04-27 02:31:18', '2025-04-27 02:40:28'),
|
||||
(3, 'JGZ9tjN_mFE91Q', 'data 12323', 12323232, 1, '2025-04-27 02:31:18', '2025-04-27 04:26:45'),
|
||||
(4, 'UVIl7qqzEdie3Q', 'data 232', 23123213, 1, '2025-04-27 02:31:18', '2025-04-27 02:35:59'),
|
||||
(5, '3lAY1upDm6gFNg', 'DATA 12323', 222222, 1, '2025-04-27 02:32:14', '2025-04-27 02:35:56'),
|
||||
(6, '5xOF5ApXhbuybQ', 'General practitioner', 50000, 0, '2025-04-27 04:30:54', '2025-04-27 04:30:54'),
|
||||
(7, '81E_LXkxK2psLg', 'Cabut Kuku', 150000, 0, '2025-04-27 04:30:54', '2025-04-27 04:30:54'),
|
||||
(8, 'Lj-vpXeJ5iI6XA', 'Suntik Vitamin C', 150000, 0, '2025-04-27 04:30:54', '2025-04-27 04:30:54'),
|
||||
(9, '3Zb8gUk2JwXh_g', 'Sunat', 500000, 0, '2025-04-27 04:30:54', '2025-04-27 04:30:54'),
|
||||
(10, 'O2ZJop5n7tH-_A', 'testeas', 123232, 1, '2025-04-27 06:02:00', '2025-04-27 06:02:04');
|
||||
|
||||
-- Dumping structure for table task_rsbhak.transaksis
|
||||
CREATE TABLE IF NOT EXISTS `transaksis` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`reg_uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`services_uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`pegawai_uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`price` bigint unsigned DEFAULT NULL,
|
||||
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `transaksis_uid_unique` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.transaksis: ~2 rows (approximately)
|
||||
INSERT IGNORE INTO `transaksis` (`id`, `uid`, `reg_uid`, `services_uid`, `pegawai_uid`, `price`, `is_delete`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'CXXR7J5PSQgCyA', 'ukI1-3XN2YOR2Q', '5xOF5ApXhbuybQ', 'Da5sqbcopPFZCQ', 0, 1, '2025-04-27 08:04:39', '2025-04-27 08:17:21'),
|
||||
(2, 'TNs_p318NyHkdQ', 'bqwXdVAbLYYlDA', '8Jk-P910QSEZvw', 'Da5sqbcopPFZCQ', 20000, 0, '2025-04-27 08:09:19', '2025-04-27 08:17:02');
|
||||
|
||||
-- Dumping structure for table task_rsbhak.users
|
||||
CREATE TABLE IF NOT EXISTS `users` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `users_uid_unique` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Dumping data for table task_rsbhak.users: ~1 rows (approximately)
|
||||
INSERT IGNORE INTO `users` (`id`, `uid`, `name`, `email`, `password`, `is_delete`, `remember_token`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'Da5sqbcopPFZCQ', 'Joko', 'joko12prasetio@gmail.com', '$2y$10$OYttHxXsvtarfjI38alwIeSCqtXGqoIuK95C5yljT4xJKbCQC.Y16', 0, NULL, '2025-04-27 00:06:27', '2025-04-27 04:24:55'),
|
||||
(2, 'v_zEQBpj5pTFeQ', 'Data 1', 'data@gmail.com', '$2y$10$PG8.qxtiFdLs6.BFmB6S6.om8wyCaauzW8hW3hyQi3myRP6owqMeq', 1, NULL, '2025-04-27 00:20:04', '2025-04-27 04:24:58'),
|
||||
(5, 'NBpFcicOdHaJNg', 'testee', 'admwh12@gmail.com', '$2y$10$GGrFw2wF6RH7R5QxmwY1uOCpb1AgpaaqhefqMjgnBKOMqzGezxoIO', 1, NULL, '2025-04-27 06:01:33', '2025-04-27 06:01:36');
|
||||
|
||||
/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
|
||||
@ -27,6 +27,11 @@ dataTable.bootstrapTable({
|
||||
<i class="far fa-trash-can fa-fw"></i>
|
||||
</button>
|
||||
`
|
||||
buttons += `
|
||||
<a class="btn btn-datatable btn-icon btn-success ml-2" href="/invoice/${row?.uid}" target="_blank" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Invoice">
|
||||
<i class="fa-solid fa-file"></i>
|
||||
</a>
|
||||
`
|
||||
return `
|
||||
<div class="d-flex space-x">
|
||||
${buttons}
|
||||
|
||||
@ -1,464 +1,128 @@
|
||||
@extends('main')
|
||||
|
||||
@section('body_section')
|
||||
<section class="section">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-md-4 col-sm-12">
|
||||
<div class="card card-statistic-2">
|
||||
<div class="card-stats">
|
||||
<div class="card-stats-title">
|
||||
</div>
|
||||
<div class="card-stats-items">
|
||||
<div class="card-stats-item">
|
||||
<div class="card-stats-item-count">{{ $total_pasien ?? 0 }}</div>
|
||||
<div class="card-stats-item-label">Total Pasien</div>
|
||||
</div>
|
||||
<div class="card-stats-item">
|
||||
<div class="card-stats-item-count">{{ $total_rp }}</div>
|
||||
<div class="card-stats-item-label">Ruangan Pelayanan</div>
|
||||
</div>
|
||||
<div class="card-stats-item">
|
||||
<div class="card-stats-item-count"> {{ $trx_today }} </div>
|
||||
<div class="card-stats-item-label">Transaksi Hari Ini</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-icon shadow-primary bg-primary">
|
||||
<i class="fas fa-archive"></i>
|
||||
</div>
|
||||
<div class="card-wrap">
|
||||
<div class="card-header">
|
||||
<h4>Pendapatan Hari ini </h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
Rp {{ number_format($trx_nominal ?? 0, 0, ',', '.') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4 col-sm-12">
|
||||
<div class="card card-statistic-2">
|
||||
<div class="card-chart">
|
||||
<canvas id="balance-chart" height="80"></canvas>
|
||||
</div>
|
||||
<div class="card-icon shadow-primary bg-primary">
|
||||
<i class="fas fa-dollar-sign"></i>
|
||||
</div>
|
||||
<div class="card-wrap">
|
||||
<div class="card-header">
|
||||
<h4>Balance</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
$187,13
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4 col-sm-12">
|
||||
<div class="card card-statistic-2">
|
||||
<div class="card-chart">
|
||||
<canvas id="sales-chart" height="80"></canvas>
|
||||
</div>
|
||||
<div class="card-icon shadow-primary bg-primary">
|
||||
<i class="fas fa-shopping-bag"></i>
|
||||
</div>
|
||||
<div class="card-wrap">
|
||||
<div class="card-header">
|
||||
<h4>Sales</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
4,732
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>Budget vs Sales</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="myChart" height="158"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card gradient-bottom">
|
||||
<div class="card-header">
|
||||
<h4>Top 5 Products</h4>
|
||||
<div class="card-header-action dropdown">
|
||||
<a href="#" data-toggle="dropdown" class="btn btn-danger dropdown-toggle">Month</a>
|
||||
<ul class="dropdown-menu dropdown-menu-sm dropdown-menu-right">
|
||||
<li class="dropdown-title">Select Period</li>
|
||||
<li><a href="#" class="dropdown-item">Today</a></li>
|
||||
<li><a href="#" class="dropdown-item">Week</a></li>
|
||||
<li><a href="#" class="dropdown-item active">Month</a></li>
|
||||
<li><a href="#" class="dropdown-item">This Year</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" id="top-5-scroll">
|
||||
<ul class="list-unstyled list-unstyled-border">
|
||||
<li class="media">
|
||||
<img class="mr-3 rounded" width="55" src="assets/img/products/product-3-50.png" alt="product">
|
||||
<div class="media-body">
|
||||
<div class="float-right"><div class="font-weight-600 text-muted text-small">86 Sales</div></div>
|
||||
<div class="media-title">oPhone S9 Limited</div>
|
||||
<div class="mt-1">
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-primary" data-width="64%"></div>
|
||||
<div class="budget-price-label">$68,714</div>
|
||||
</div>
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-danger" data-width="43%"></div>
|
||||
<div class="budget-price-label">$38,700</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="mr-3 rounded" width="55" src="assets/img/products/product-4-50.png" alt="product">
|
||||
<div class="media-body">
|
||||
<div class="float-right"><div class="font-weight-600 text-muted text-small">67 Sales</div></div>
|
||||
<div class="media-title">iBook Pro 2018</div>
|
||||
<div class="mt-1">
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-primary" data-width="84%"></div>
|
||||
<div class="budget-price-label">$107,133</div>
|
||||
</div>
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-danger" data-width="60%"></div>
|
||||
<div class="budget-price-label">$91,455</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="mr-3 rounded" width="55" src="assets/img/products/product-1-50.png" alt="product">
|
||||
<div class="media-body">
|
||||
<div class="float-right"><div class="font-weight-600 text-muted text-small">63 Sales</div></div>
|
||||
<div class="media-title">Headphone Blitz</div>
|
||||
<div class="mt-1">
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-primary" data-width="34%"></div>
|
||||
<div class="budget-price-label">$3,717</div>
|
||||
</div>
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-danger" data-width="28%"></div>
|
||||
<div class="budget-price-label">$2,835</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="mr-3 rounded" width="55" src="assets/img/products/product-3-50.png" alt="product">
|
||||
<div class="media-body">
|
||||
<div class="float-right"><div class="font-weight-600 text-muted text-small">28 Sales</div></div>
|
||||
<div class="media-title">oPhone X Lite</div>
|
||||
<div class="mt-1">
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-primary" data-width="45%"></div>
|
||||
<div class="budget-price-label">$13,972</div>
|
||||
</div>
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-danger" data-width="30%"></div>
|
||||
<div class="budget-price-label">$9,660</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="mr-3 rounded" width="55" src="assets/img/products/product-5-50.png" alt="product">
|
||||
<div class="media-body">
|
||||
<div class="float-right"><div class="font-weight-600 text-muted text-small">19 Sales</div></div>
|
||||
<div class="media-title">Old Camera</div>
|
||||
<div class="mt-1">
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-primary" data-width="35%"></div>
|
||||
<div class="budget-price-label">$7,391</div>
|
||||
</div>
|
||||
<div class="budget-price">
|
||||
<div class="budget-price-square bg-danger" data-width="28%"></div>
|
||||
<div class="budget-price-label">$5,472</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-footer pt-3 d-flex justify-content-center">
|
||||
<div class="budget-price justify-content-center">
|
||||
<div class="budget-price-square bg-primary" data-width="20"></div>
|
||||
<div class="budget-price-label">Selling Price</div>
|
||||
</div>
|
||||
<div class="budget-price justify-content-center">
|
||||
<div class="budget-price-square bg-danger" data-width="20"></div>
|
||||
<div class="budget-price-label">Budget Price</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>Best Products</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="owl-carousel owl-theme" id="products-carousel">
|
||||
<div>
|
||||
<div class="product-item pb-3">
|
||||
<div class="product-image">
|
||||
<img alt="image" src="assets/img/products/product-4-50.png" class="img-fluid">
|
||||
</div>
|
||||
<div class="product-details">
|
||||
<div class="product-name">iBook Pro 2018</div>
|
||||
<div class="product-review">
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
</div>
|
||||
<div class="text-muted text-small">67 Sales</div>
|
||||
<div class="product-cta">
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="product-item">
|
||||
<div class="product-image">
|
||||
<img alt="image" src="assets/img/products/product-3-50.png" class="img-fluid">
|
||||
</div>
|
||||
<div class="product-details">
|
||||
<div class="product-name">oPhone S9 Limited</div>
|
||||
<div class="product-review">
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star-half"></i>
|
||||
</div>
|
||||
<div class="text-muted text-small">86 Sales</div>
|
||||
<div class="product-cta">
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="product-item">
|
||||
<div class="product-image">
|
||||
<img alt="image" src="assets/img/products/product-1-50.png" class="img-fluid">
|
||||
</div>
|
||||
<div class="product-details">
|
||||
<div class="product-name">Headphone Blitz</div>
|
||||
<div class="product-review">
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="fas fa-star"></i>
|
||||
<i class="far fa-star"></i>
|
||||
</div>
|
||||
<div class="text-muted text-small">63 Sales</div>
|
||||
<div class="product-cta">
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>Top Countries</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="text-title mb-2">July</div>
|
||||
<ul class="list-unstyled list-unstyled-border list-unstyled-noborder mb-0">
|
||||
<li class="media">
|
||||
<img class="img-fluid mt-1 img-shadow" src="assets/modules/flag-icon-css/flags/4x3/id.svg" alt="image" width="40">
|
||||
<div class="media-body ml-3">
|
||||
<div class="media-title">Indonesia</div>
|
||||
<div class="text-small text-muted">3,282 <i class="fas fa-caret-down text-danger"></i></div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="img-fluid mt-1 img-shadow" src="assets/modules/flag-icon-css/flags/4x3/my.svg" alt="image" width="40">
|
||||
<div class="media-body ml-3">
|
||||
<div class="media-title">Malaysia</div>
|
||||
<div class="text-small text-muted">2,976 <i class="fas fa-caret-down text-danger"></i></div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="img-fluid mt-1 img-shadow" src="assets/modules/flag-icon-css/flags/4x3/us.svg" alt="image" width="40">
|
||||
<div class="media-body ml-3">
|
||||
<div class="media-title">United States</div>
|
||||
<div class="text-small text-muted">1,576 <i class="fas fa-caret-up text-success"></i></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-6 mt-sm-0 mt-4">
|
||||
<div class="text-title mb-2">August</div>
|
||||
<ul class="list-unstyled list-unstyled-border list-unstyled-noborder mb-0">
|
||||
<li class="media">
|
||||
<img class="img-fluid mt-1 img-shadow" src="assets/modules/flag-icon-css/flags/4x3/id.svg" alt="image" width="40">
|
||||
<div class="media-body ml-3">
|
||||
<div class="media-title">Indonesia</div>
|
||||
<div class="text-small text-muted">3,486 <i class="fas fa-caret-up text-success"></i></div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="img-fluid mt-1 img-shadow" src="assets/modules/flag-icon-css/flags/4x3/ps.svg" alt="image" width="40">
|
||||
<div class="media-body ml-3">
|
||||
<div class="media-title">Palestine</div>
|
||||
<div class="text-small text-muted">3,182 <i class="fas fa-caret-up text-success"></i></div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<img class="img-fluid mt-1 img-shadow" src="assets/modules/flag-icon-css/flags/4x3/de.svg" alt="image" width="40">
|
||||
<div class="media-body ml-3">
|
||||
<div class="media-title">Germany</div>
|
||||
<div class="text-small text-muted">2,317 <i class="fas fa-caret-down text-danger"></i></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>Invoices</h4>
|
||||
<div class="card-header-action">
|
||||
<a href="#" class="btn btn-danger">View More <i class="fas fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive table-invoice">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Invoice ID</th>
|
||||
<th>Customer</th>
|
||||
<th>Status</th>
|
||||
<th>Due Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">INV-87239</a></td>
|
||||
<td class="font-weight-600">Kusnadi</td>
|
||||
<td><div class="badge badge-warning">Unpaid</div></td>
|
||||
<td>July 19, 2018</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">INV-48574</a></td>
|
||||
<td class="font-weight-600">Hasan Basri</td>
|
||||
<td><div class="badge badge-success">Paid</div></td>
|
||||
<td>July 21, 2018</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">INV-76824</a></td>
|
||||
<td class="font-weight-600">Muhamad Nuruzzaki</td>
|
||||
<td><div class="badge badge-warning">Unpaid</div></td>
|
||||
<td>July 22, 2018</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">INV-84990</a></td>
|
||||
<td class="font-weight-600">Agung Ardiansyah</td>
|
||||
<td><div class="badge badge-warning">Unpaid</div></td>
|
||||
<td>July 22, 2018</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">INV-87320</a></td>
|
||||
<td class="font-weight-600">Ardian Rahardiansyah</td>
|
||||
<td><div class="badge badge-success">Paid</div></td>
|
||||
<td>July 28, 2018</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-primary">Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- FORM FILTER --}}
|
||||
<form method="GET" action="{{ url()->current() }}" class="mb-4 ">
|
||||
<div class="row ">
|
||||
<div class="col-md-4">
|
||||
<div class="card card-hero">
|
||||
<div class="card-header">
|
||||
<div class="card-icon">
|
||||
<i class="far fa-question-circle"></i>
|
||||
</div>
|
||||
<h4>14</h4>
|
||||
<div class="card-description">Customers need help</div>
|
||||
<select name="filter" id="filter" class="form-control border-info">
|
||||
<option value="today" {{ request('filter') == 'today' ? 'selected' : '' }}>Hari Ini</option>
|
||||
<option value="yesterday" {{ request('filter') == 'yesterday' ? 'selected' : '' }}>Kemarin</option>
|
||||
<option value="7days" {{ request('filter') == '7days' ? 'selected' : '' }}>7 Hari Terakhir</option>
|
||||
<option value="30days" {{ request('filter') == '30days' ? 'selected' : '' }}>30 Hari Terakhir</option>
|
||||
<option value="this_month" {{ request('filter') == 'this_month' ? 'selected' : '' }}>Bulan Ini</option>
|
||||
<option value="custom" {{ request('filter') == 'custom' ? 'selected' : '' }}>Custom Range</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6" id="custom-range" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input type="date" name="start_date" class="form-control" value="{{ request('start_date') }}">
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="tickets-list">
|
||||
<a href="#" class="ticket-item">
|
||||
<div class="ticket-title">
|
||||
<h4>My order hasn't arrived yet</h4>
|
||||
</div>
|
||||
<div class="ticket-info">
|
||||
<div>Laila Tazkiah</div>
|
||||
<div class="bullet"></div>
|
||||
<div class="text-primary">1 min ago</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="#" class="ticket-item">
|
||||
<div class="ticket-title">
|
||||
<h4>Please cancel my order</h4>
|
||||
</div>
|
||||
<div class="ticket-info">
|
||||
<div>Rizal Fakhri</div>
|
||||
<div class="bullet"></div>
|
||||
<div>2 hours ago</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="#" class="ticket-item">
|
||||
<div class="ticket-title">
|
||||
<h4>Do you see my mother?</h4>
|
||||
</div>
|
||||
<div class="ticket-info">
|
||||
<div>Syahdan Ubaidillah</div>
|
||||
<div class="bullet"></div>
|
||||
<div>6 hours ago</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="features-tickets.html" class="ticket-item ticket-more">
|
||||
View All <i class="fas fa-chevron-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<input type="date" name="end_date" class="form-control" value="{{ request('end_date') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-info w-100">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{{-- KONTEN --}}
|
||||
<div class="row">
|
||||
|
||||
{{-- KOLOM KIRI: TABEL INVOICE --}}
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>Transaksi</h4>
|
||||
<div class="card-header-action">
|
||||
<a href="/transaksi" class="btn btn-danger">View More <i class="fas fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive table-invoice">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nama Pasien</th>
|
||||
<th>Tanggal Lahir</th>
|
||||
<th>Tindakan</th>
|
||||
<th>Tarif</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- Contoh Data --}}
|
||||
@foreach ($transaksi as $item)
|
||||
<tr>
|
||||
<td>{{ $item->register?->patient->name ?? '-' }}</td>
|
||||
<td>{{ $item->register?->patient->birth ?? '-' }}</td>
|
||||
<td class="font-weight-600">{{ $item->tindakan?->name ?? '-' }}</td>
|
||||
<td><div class="badge badge-success">{{ number_format($item->price ?? 0, 0, ',', '.') }}</div></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
{{-- Tambah looping data invoice kalau mau dynamic --}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- KOLOM KANAN: CARD STATISTIK --}}
|
||||
<div class="col-md-4">
|
||||
<div class="card card-hero">
|
||||
<div class="card-header">
|
||||
<div class="card-icon">
|
||||
<i class="far fa-question-circle"></i>
|
||||
</div>
|
||||
<h4>{{ $trx_today }} (Rp {{ number_format($trx_nominal ?? 0, 0, ',', '.') }})</h4>
|
||||
<div class="card-description">Total Pasien dan Pendapatan Hari Ini</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="tickets-list">
|
||||
<a href="#" class="ticket-item">
|
||||
<div class="ticket-title">
|
||||
<h4>Total Ruangan Pelayanan</h4>
|
||||
</div>
|
||||
<div class="ticket-info">
|
||||
<h4>{{ $total_rp }}</h4>
|
||||
</div>
|
||||
</a>
|
||||
<a href="#" class="ticket-item">
|
||||
<div class="ticket-title">
|
||||
<h4>Total Asuransi yang Bekerja Sama</h4>
|
||||
</div>
|
||||
<div class="ticket-info">
|
||||
<h4>{{ $asuransi }}</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> {{-- End Row --}}
|
||||
</section>
|
||||
|
||||
<script>
|
||||
document.getElementById('filter').addEventListener('change', function() {
|
||||
if (this.value === 'custom') {
|
||||
document.getElementById('custom-range').style.display = 'block';
|
||||
} else {
|
||||
document.getElementById('custom-range').style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
// Pastikan saat reload, custom-range tetap tampil kalau "custom" dipilih
|
||||
if (document.getElementById('filter').value === 'custom') {
|
||||
document.getElementById('custom-range').style.display = 'block';
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
42
resources/views/transaksi/invoice.blade.php
Normal file
42
resources/views/transaksi/invoice.blade.php
Normal file
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Invoice #{{ $transaksi->id }}</title>
|
||||
<style>
|
||||
body { font-family: sans-serif; font-size: 12px; }
|
||||
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
|
||||
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
|
||||
th { background-color: #f2f2f2; }
|
||||
.total { text-align: right; margin-top: 20px; font-size: 14px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>INVOICE</h2>
|
||||
|
||||
<p>No Invoice: <strong>{{ $transaksi->id }}</strong></p>
|
||||
<p>Tanggal: <strong>{{ $transaksi->created_at->format('d/m/Y') }}</strong></p>
|
||||
<p>Pasien: <strong>{{ $transaksi->register->patient->name }}</strong></p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tindakan</th>
|
||||
<th>Harga</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $transaksi->tindakan?->name }}</td>
|
||||
<td>Rp {{ number_format($transaksi->price, 0, ',', '.') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="total">
|
||||
<strong>Total: Rp {{ number_format($transaksi->price, 0, ',', '.') }}</strong>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -41,6 +41,7 @@ Route::group(['middleware' => ['auth']], function(){
|
||||
Route::resource('/registrasi', RegistrasiPasienController::class);
|
||||
Route::get('/datatable/registrasi', [RegistrasiPasienController::class, 'datatable']);
|
||||
Route::resource('/transaksi', TransaksiController::class);
|
||||
Route::get('/invoice/{uid}', [TransaksiController::class, 'invoice']);
|
||||
Route::get('/datatable/transaksi', [TransaksiController::class, 'datatable']);
|
||||
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user