This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Invoice.php Model | |
| /** | |
| * @param Builder $query | |
| * @param $value | |
| * @return Builder | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use Carbon\Carbon; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Support\Facades\Http; | |
| class NewsSampleController extends Controller | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function login(Request $request) | |
| { | |
| try { | |
| $credentials = $request->only(['email', 'password']); | |
| if (! $token = auth()->attempt($credentials)) { | |
| return response()->json(['error' => 'Unauthorized'], 401); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @setup | |
| require __DIR__.'/vendor/autoload.php'; | |
| $dotenv = Dotenv\Dotenv::createImmutable(__DIR__); | |
| try { | |
| $dotenv->load(); | |
| $dotenv->required(['DEPLOY_SERVER', 'DEPLOY_REPOSITORY', 'DEPLOY_PATH'])->notEmpty(); | |
| } catch ( Exception $e ) { | |
| echo $e->getMessage(); | |
| exit; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $warehouses = Warehouse::where('companies_id', $companies->id)->get(); | |
| $stock_array = []; | |
| foreach($warehouses as $warehouse) { | |
| $stockIn = Stock::where('warehouse_id', $warehouse->id)->where('status', 'stock_in')->sum('kolom table qty') | |
| $stockOut = Stock::where('warehouse_id', $warehouse->id)->where('status', 'stock_out')->sum('kolom table qty') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function dateBetweenFilterFn(rows, id, filterValues) { | |
| const sd = filterValues[0] ? new Date(filterValues[0]) : undefined; | |
| const ed = filterValues[1] ? new Date(filterValues[1]) : undefined; | |
| if (sd == 'Invalid Date' || ed == 'Invalid Date') { | |
| return rows; | |
| } | |
| if (ed || sd) { | |
| return rows.filter((r) => { | |
| var dateAndHour = r.values['created_at'].split(' '); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Modules\Atom\Http\Controllers\Import; | |
| use App\Import\PurchaseItemImport; | |
| use Illuminate\Contracts\Support\Renderable; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Routing\Controller; | |
| use Maatwebsite\Excel\Facades\Excel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Imports\Atom; | |
| use Maatwebsite\Excel\Concerns\Importable; | |
| use Maatwebsite\Excel\Concerns\RegistersEventListeners; | |
| use Maatwebsite\Excel\Concerns\ToModel; | |
| use Maatwebsite\Excel\Concerns\WithChunkReading; | |
| use Maatwebsite\Excel\Concerns\WithEvents; | |
| use Maatwebsite\Excel\Concerns\WithHeadingRow; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import LayoutMember from "@/layouts/LayoutMember"; | |
| import { TenantProductService } from "@/services/tenant/tenant-product"; | |
| import { ActionIcon, Button, Container, Grid, Group, LoadingOverlay, NumberInput, Paper, ScrollArea, Select, Table, Text, Textarea, TextInput, useMantineTheme } from "@mantine/core"; | |
| import { useForm, useDebouncedValue } from "@mantine/hooks"; | |
| import { useEffect, useState, useRef } from "react"; | |
| import { HiOutlinePlus, HiOutlineTrash } from "react-icons/hi"; | |
| import { BsPercent } from 'react-icons/bs' | |
| import useStyles from '@/components/Estimate/styles/EstimateCreateStyles' | |
| import { DatePicker } from "@mantine/dates"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function handle($id) | |
| { | |
| $spa = Spa::find($id); | |
| $pdf = PDF::loadView('pdf.print_jadwal', ['spa' => $spa]); | |
| $content = $pdf->download()->getOriginalContent(); | |
| $file_final = Storage::disk('public')->put($spa->id.'spa_jadwal.pdf', $content); | |