public function __construct(FreightPrice $freightprice, Truck $truck, Party $party, Station $station)
 {
     $this->truck = $truck->where('company_id', Auth::user()->company_id)->where('account_year_id', session('account'));
     $this->party = $party->where('company_id', Auth::user()->company_id)->where('account_year_id', session('account'));
     $this->station = $station->where('company_id', Auth::user()->company_id)->where('account_year_id', session('account'));
     $this->freightprice = $freightprice->where('company_id', Auth::user()->company_id)->where('account_year_id', session('account'));
 }
 public function getEdit($id)
 {
     $stockRequisition = StockRequisition::find($id);
     $products = new Product();
     $productAll = $products->getProductsWithCategories();
     $parties = new Party();
     $partyAll = $parties->getPartiesDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     return view('StockRequisition.edit', compact('stockRequisition'))->with('partyAll', $partyAll)->with('productAll', $productAll)->with('branchAll', $branchAll);
 }
 public function getCreate()
 {
     $stockInfos = new StockInfo();
     $allStockInfos = $stockInfos->getStockInfoDropDown();
     $parties = new Party();
     $partyAll = $parties->getPartiesDropDown();
     $imports = new Import();
     $consignmentAll = $imports->getConsignmentNameDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     return view('SalesReturn.add', compact('allStockInfos', 'consignmentAll'))->with('branchAll', $branchAll)->with('partyAll', $partyAll);
 }
示例#4
0
 public function getEdit($id)
 {
     $buyers = new Party();
     $buyersAll = $buyers->getBuyersDropDown();
     $products = new Product();
     $finishGoods = $products->getFinishGoodsDropDown();
     $stockInfos = new StockInfo();
     $allStockInfos = $stockInfos->getStockInfoDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     $sale[0] = Sale::where('invoice_id', '=', $id)->get();
     $var = $sale[0];
     $saleDetails = SAleDetail::where('invoice_id', '=', $id)->get();
     return view('Sales.edit', compact('buyersAll'))->with('finishGoods', $finishGoods)->with('saleDetails', $saleDetails)->with('sale', $var)->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos);
 }
示例#5
0
 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']));
 }
示例#6
0
文件: Main.php 项目: Jheysoon/lcis-2
 function index(Request $request)
 {
     if (!Auth::guest()) {
         $user = Party::find(Auth::user()->id);
         return view('home', ['user' => $user]);
     } else {
         return $this->login($request);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('party_answers')->truncate();
     $parties = Party::all();
     foreach ($parties as $party) {
         // All 10 test questions are using answer set 1, so answer_id ranges from 1 to 6
         foreach (range(1, 10) as $index) {
             DB::table('party_answers')->insert(['party_id' => $party->id, 'question_id' => $index, 'answer_id' => rand(1, 6), 'created_at' => Carbon::now()->toDateTimeString(), 'updated_at' => Carbon::now()->toDateTimeString()]);
         }
     }
 }
 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);
 }
示例#9
0
 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);
 }
示例#10
0
 public function register_new_student(NewStudentRegRequest $request)
 {
     DB::transaction(function () {
         $party = new Party();
         $party->firstname = $request->firstname;
         $party->lastname = $request->lastname;
         $party->middlename = $request->middlename;
         $party->sex = $request->gender;
         $party->placeofbirth = $request->pob;
         $party->dateofbirth = $request->dob;
         $party->mobilenumber = $request->contact;
         $party->religion = $request->religion;
         $party->emailaddress = $request->emailadd;
         $party->civilstatus = $request->maritalstatus;
         $party->legacyid = $this->system->laststudentid;
         $party->address1 = $request->mailing_add;
         // insert into party
         $party->save();
         // get the inserted id
         $party_id = $party->id;
         // set the laststudentid
         $this->setLastStudentId();
         $curriculum = Curriculum::getCurrentCurriculum($request->course, $request->major, $this->system);
         $coursemajor = DB::table('coursemajor')->where('course', $request->course)->where('major', $request->major)->first();
         $registration = new ModelRegistration();
         $registration->curriculum = $curriculum;
         $registration->student = $party_id;
         $registration->academicterm = $this->system->currentacademicterm;
         $registration->status = 'P';
         $registration->date = date('Y-m-d');
         $registration->coursemajor = $coursemajor->id;
         // insert into registration
         $registration->save();
         DB::table('tbl_student')->insert(['id' => $party_id, 'fathername' => $request->father_name, 'fatherproffession' => $request->father_occupation, 'mothername' => $request->mother_name, 'motherproffession' => $request->mother_occupation]);
         DB::table('tbl_useraccess')->insert(['id' => $party_id, 'username' => $request->username, 'password' => password_hash($request->password, PASSWORD_BCRYPT)]);
         // TODO: insert into tbl_useroption
     });
     Session::put('message', htmlAlert('Successfully Registered', 'success'));
     return back();
 }
示例#11
0
 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');
 }
示例#12
0
 public function legacyid(Request $request)
 {
     $partys = Party::where('legacyid', $request->student);
     // think twice if this checking is needed
     // since the dropdown will show a reliable results
     if ($partys->count() > 0) {
         $party = $partys->first();
         return redirect("{$request->redirect}/{$party->id}");
     } else {
         return back();
     }
     // TODO: return back with error
 }
示例#13
0
文件: Sched.php 项目: Jheysoon/lcis-2
 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);
 }
示例#14
0
 /**
  * Get top matching parties for one questionnaire under current user
  *
  * @param int $questionnaireId
  * @return array $topMatchingParties
  */
 public function topMatchingParties($questionnaireId)
 {
     $baseScore = $this->baseScore($questionnaireId);
     $parties = Party::where('questionnaire_id', $questionnaireId)->get()->toArray();
     foreach ($parties as &$party) {
         $partyScore = $this->partyScore($party['id'], $questionnaireId);
         $party['matchingScore'] = $partyScore / $baseScore;
     }
     usort($parties, function ($a, $b) {
         return $b['matchingScore'] <=> $a['matchingScore'];
     });
     // Return top 3 matching parties
     return array_slice($parties, 0, 3);
 }
示例#15
0
 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);
 }
 public function getEdit($id)
 {
     $stockInvoices = SalesReturnInvoice::find($id);
     $branches = new Branch();
     $stockDetails = SalesReturnDetail::where('invoice_id', '=', $stockInvoices->invoice_id)->first();
     $stockDetails2 = SalesReturnDetail::where('invoice_id', '=', $stockInvoices->invoice_id)->get();
     // get all stocks
     $invoiceId = $stockInvoices->invoice_id;
     //$invoiceId = 's121513';
     $buyersAll = 0;
     $imports = Import::where('status', '=', 'Activate')->get();
     $productsName = Product::where('product_type', '=', $stockDetails->product_type)->get();
     $stockInfos = new StockInfo();
     $allStockInfos = $stockInfos->getStockInfoDropDown();
     $parties = new Party();
     $partyAll = $parties->getPartiesDropDown();
     $imports = new Import();
     $consignmentAll = $imports->getConsignmentNameDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     $imports = Import::where('status', '=', 'Activate')->get();
     return view('SalesReturn.edit2', compact('buyersAll', 'invoiceId', 'stockInvoices', 'stockDetails', 'productsName', 'stockDetails2', 'imports', 'partyAll', 'consignmentAll'))->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos);
     //        return view('Stocks.edit',compact('stock'))
     //            ->with('allStockInfos',$allStockInfos)
     //            ->with('branchAll',$branchAll);
 }
示例#17
0
                        </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>&nbsp;&nbsp; Detail</a></td>
                                        <td><a class="btn blue btn-sm" href="{{ URL::to('salesreturn/edit/'.$row->id) }}"><i
示例#18
0
 public function getMakeall()
 {
     $accountCategories = new AccountCategory();
     $saleDetails = new SAleDetail();
     $transactions = new Transaction();
     $accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     $buyers = new Party();
     $partyAll = $buyers->getPartiesDropDown();
     return view('Sales.paymentAddAll', compact('accountCategoriesAll'))->with('branchAll', $branchAll)->with('partyAll', $partyAll);
 }
                            <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>
@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];
示例#21
0
 public function __construct(Godown $godown, Branch $branch, Party $party)
 {
     $this->branch = $branch->where('company_id', Auth::user()->company_id)->where('account_year_id', session('account'));
     $this->party = $party->where('company_id', Auth::user()->company_id)->where('account_year_id', session('account'));
     $this->godown = $godown->where('company_id', Auth::user()->company_id)->where('account_year_id', session('account'));
 }
示例#22
0
                    <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>
示例#23
0
    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>
 /**
  * Display a party detail page.
  *
  * @param  int  $questionnaireId
  * @param  int  $partyId
  * @return \Illuminate\Http\Response
  */
 public function show($questionnaireId, $partyId)
 {
     $party = Party::findOrFail($partyId);
     return view('parties.show')->with(compact('questionnaireId', 'party'));
 }
 public function getEdit($id)
 {
     $suppliers = new Party();
     $suppliersAll = $suppliers->getSuppliersDropDown();
     $products = new Product();
     $localProducts = $products->getLocalProductsDropDown();
     $stockInfos = new StockInfo();
     $allStockInfos = $stockInfos->getStockInfoDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     $purchase[0] = PurchaseInvoice::where('invoice_id', '=', $id)->get();
     $var = $purchase[0];
     $purchaseDetails = PurchaseInvoiceDetail::where('detail_invoice_id', '=', $id)->get();
     return view('PurchaseInvoice.edit', compact('suppliersAll'))->with('localProducts', $localProducts)->with('purchaseDetails', $purchaseDetails)->with('purchase', $var)->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos);
 }
 public function getMakeall()
 {
     $accountCategories = new AccountCategory();
     $accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     $buyers = new Party();
     $partyAll = $buyers->getSuppliersDropDown();
     return view('PurchaseInvoice.paymentAddAll', compact('accountCategoriesAll'))->with('branchAll', $branchAll)->with('partyAll', $partyAll);
 }
示例#27
0
 public function getPurchasepartyledger()
 {
     $parties = new Party();
     $partiesAll = $parties->getPartiesDropDown();
     return view('Reports.purchasePartyLedger')->with('partiesAll', $partiesAll);
 }
示例#28
0
               <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>
示例#29
0
<script>
    function closeModal() {
        /*$('#sale').modal('hide');
         $('body').removeClass('modal-open');
         $('.modal-backdrop').hide();*/
        $("#sale").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" onclick="closeModal()" class="close" data-dismiss="modal" aria-hidden="true"></button>
            <h3>Sales Detail for {{$sr->branch->name}}</h3>
            <?php 
$party = \App\Party::where('id', '=', $sr->party_id)->first();
?>

            <h4>Party Name : <?php 
echo $party->name;
?>
</h4>
            <h4>Product Status: <?php 
echo $sr->product_status;
?>
</h4>
            <h4>Ref noe : <?php 
echo $sr->ref_no;
?>
</h4>
        </div>