function index(Request $request) { if (!Auth::guest()) { $user = Party::find(Auth::user()->id); return view('home', ['user' => $user]); } else { return $this->login($request); } }
public function getChangeStatus($status, $id) { $party = Party::find($id); if ($party['status'] == $status) { $party->status = $status == 'Activate' ? 'Deactivate' : 'Activate'; $party->save(); } return new JsonResponse(array('id' => $party['id'], 'status' => $party['status'])); }
public function postRequisitionResult() { $party = Input::get('party_id'); $branch = Input::get('branch_id'); $date1 = Input::get('from_date'); $date2 = Input::get('to_date'); $search = new Search(); $partyName = Party::find($party); $results = $search->getResultRequisition($party, $branch, $date1, $date2); return view('Searches.requisitionResult', compact('results'))->with('partyName', $partyName); }
public function show($registration_id) { // TODO: just show what change . previous value and current value // show the student id $registration = Registration::find($registration_id); $party = Party::find($registration->student); $data['firstname'] = $party->firstname; $data['lastname'] = $party->lastname; $data['middlename'] = $party->middlename; $data['id'] = $registration_id; return view('registrar.show_registration', $data); }
public function update(UpdateRegistrationRequest $request) { $party = Party::find($request->student); $party->firstname = $request->firstname; $party->lastname = $request->lastname; $party->middlename = $request->middlename; $party->emailaddres = $request->emailadd; $party->sex = $request->gender; $party->mobilenumber = $request->contact; $party->address1 = $request->mailing_add; Session::flashdata('message', htmlAlert('Successfully Updated', 'success')); return redirect('update_registration'); }
public function show($id) { $inst = Party::find($id); if ($inst instanceof ModelNotFoundException) { return view('errors.404'); } $data['instructor'] = $inst; $data['classes'] = Classallocation::where('academicterm', $this->system->phaseterm)->where('instructor', $id); $data['days'] = Day::where('id', '!=', 8)->get(); $data['times'] = Time::all(); $schedCollection = new SchedCollection(); $data['table_day'] = $schedCollection->getSchedInstructor($id, $this->system); return view('instructor.sched', $data); }
public function show($id) { $party = Party::find($id); $registration = Registration::student($id)->latest()->first(); $coursemajor = DB::table('tbl_coursemajor')->where('id', $registration->coursemajor)->first(); $data['courses'] = Course::all(); $data['majors'] = DB::table('tbl_major')->get(); $data['religions'] = DB::table('tbl_religion')->get(); $data['firstname'] = $party->firstname; $data['lastname'] = $party->lastname; $data['middlename'] = $party->middlename; $data['course_student'] = $coursemajor->course; $data['major_student'] = $coursemajor->major; $data['shift'] = $data['update'] = 'yes it is'; return view('registrar.shift_registration', $data); }
@extends('baseLayout') @section('styles') <link rel="stylesheet" type="text/css" href="{{ URL::asset('assets/plugins/select2/select2_metro.css') }}" /> <link rel="stylesheet" type="text/css" href="{{ URL::asset('assets/plugins/bootstrap-datepicker/css/datepicker.css') }}" /> @stop @section('content') <div class="row"> <div class="col-md-12"> <!-- BEGIN PAGE TITLE & BREADCRUMB--> <?php $parties = \App\Party::find($party_id); ?> <h3 class="page-title"> Purchase Due Report for {{$parties->name}} </h3> </div> </div> <div class="row"> <div class="col-md-12"> <!-- BEGIN EXAMPLE TABLE PORTLET--> <div class="portlet box light-grey"> <div class="portlet-title"> <?php $date01 = explode('/', $date1); $month1 = $date01[0]; $day1 = $date01[1];
<th>Party</th> <th>Total Sale</th> <th>Total Payment </th> <th>Due</th> </tr> </thead> <tbody> <?php $totalSale = 0; $totalPayment = 0; $totalDue = 0; ?> @foreach($results as $result ) <?php $party = \App\Party::find($result->party); $reports = new \App\Report(); $payment = $reports->getPaymentForSalesDueReport($date1, $date2, $result->party); ?> <tr class="odd gradeX"> <td>{{$result->date}}</td> <td>{{$party->name}}</td> <td>{{$result->totalSale}}</td> <td> @if($payment[0]->totalPayment) {{$payment[0]->totalPayment}} @else {{0}} @endif </td> <td>{{$result->totalSale - $payment[0]->totalPayment}}</td>
<img src="../../assets/img/pad/me-challan.jpg" style="width: 100%;" alt="" /> @endif </div> <hr /> {{--<div class="col-xs-6"> <p># {{$sale->invoice_id}} <span class="muted">--{{$sale->created_at}}</span></p> </div>--}} </div> <div class="row" style="margin-top: -10px;"> <div class="col-xs-4"> {{-- <h4>Client:</h4>--}} <?php $party = \App\Party::find($sale->party_id); ?> <table> <tr> <td><b>Customer</b></td> <td>: {{$party->name}}</td> </tr> <tr> <td><b>Address</b></td> <td>: {{$party->address}}</td> </tr> <tr> <td><b>Contact</b></td> <td>: {{$party->phone}}</td> </tr>
function closeModal() { /*$('#sale').modal('hide'); $('body').removeClass('modal-open'); $('.modal-backdrop').hide();*/ $("#purchaseInvoice").modal('hide').on('hidden.bs.modal', functionThatEndsUpDestroyingTheDOM); $('.modal-backdrop').hide(); } </script> <div class="modal-dialog shape"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <?php $party = new \App\Party(); $partyName = \App\Party::find($purchase->party_id); ?> <h3>Purchase Invoice Detail for {{$partyName->name}}</h3> </div> <div class="modal-body"> <table class="table table-striped table-bordered table-hover" id="PurchaseDetailtable"> <thead style="background-color: #68bbec"> <tr> <th>Branch Name</th> <th>Stock Name</th> <th>Product Type</th> <th>Product Name</th> <th>Price</th> <th>Quantity</th> <th>Amount</th> <th>Remarks</th>
<p># {{$sale->invoice_id}} <span class="muted">--{{$sale->created_at}}</span></p> </div>--}} </div> <div class="row" style="margin-top: -10px;"> <div class="col-xs-8"> <table> <tr> <td><b>Branch #</b></td> <td>: {{$srInvoice->branch->name}}</td> </tr> <tr> <td><b>Party</b></td> <?php $party = \App\Party::find($srInvoice->party_id); ?> <td>: {{$party->name}}</td> </tr> </table> </div> <div class="col-xs-4 invoice-payment"> <table> <tr> <td><b>Invoice #</b></td> <td>: {{$srInvoice->invoice_id}}</td> </tr> <tr> <td><b>Date</b></td> <td>: {{date("d-m-Y")}}</td> </tr>
</tr> </thead> <tbody> <?php $sl = 1; ?> @foreach($salesreturn as $row) <tr class="odd gradeX"> <td><?php echo $sl; ?> </td> <td>{{$row->invoice_id}}</td> <td>{{$row->branch->name}}</td> <?php $party = \App\Party::find($row->party_id); ?> <td>{{$party->name}}</td> <td>{{$row->ref_no}}</td> <td>{{$row->product_status}}</td> <td>{{$row->discount_percentage}}</td> <td>{{$row->user->name}}</td> <td> {{--<a class="btn blue btn-sm" href="{{ URL::to('stocks/edit/'. $stock->id ) }}"><i class="fa fa-edit"></i>Edit</a>--}} <table> <tr> <td><a class="btn dark btn-sm" rel="invoice_id" data-toggle="modal" data-target="#sale" href="{{ URL::to('salesreturn/details/'.$row->invoice_id) }}" > <i class="fa fa-eye"></i> Detail</a></td> <td><a class="btn blue btn-sm" href="{{ URL::to('salesreturn/edit/'.$row->id) }}"><i