예제 #1
0
 public function getPayment($invoiceid)
 {
     $id = $invoiceid;
     $invoice = Invoice::with(['payments', 'comments'])->where('Id', $id)->get();
     //dd($invoice);
     return View('collectionmodule/payment')->with(array('invoice' => $invoice));
 }
 public function getPayment($invoiceid)
 {
     $id = $invoiceid;
     $invoice = Invoice::with(['payments', 'comments'])->where('Id', $id)->get();
     $userDetail = User::where('empid', '=', $invoice[0]->RepresentativeNo)->get();
     if (count($userDetail) > 0) {
         $salesName = $userDetail[0]->name;
     } else {
         $salesName = '';
     }
     return View('collectionmodule/payment')->with(array('invoice' => $invoice, 'repName' => $salesName));
 }
예제 #3
0
 public function getDeposits()
 {
     $currentDate = Carbon::now()->toDateString();
     return Invoice::with('user')->where('deposit', '>', 0)->where('travel_end_date', '>', $currentDate)->orderBy('deposit_due')->get();
 }
예제 #4
0
 /**
  * Get from query
  */
 public function get($page = null)
 {
     return $this->query(Invoice::with('client', 'items', 'quote', 'payments'), $page);
 }