Optimise charge table, implemented charge recording, optimised payment recording
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use App\Interfaces\IDs;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Leenooks\Traits\ScopeActive;
|
||||
use App\Traits\{NextKey,PushNew};
|
||||
|
||||
use App\Interfaces\IDs;
|
||||
use App\Traits\PushNew;
|
||||
|
||||
/**
|
||||
* Class Payment
|
||||
@@ -74,7 +74,6 @@ class Payment extends Model implements IDs
|
||||
|
||||
public function scopeUnapplied($query)
|
||||
{
|
||||
//DB::enableQueryLog();
|
||||
return $query
|
||||
->select(['payments.id','payment_date','account_id','checkout_id','total_amt',DB::raw("SUM(alloc_amt) as allocated")])
|
||||
->leftJoin('payment_items',['payment_items.payment_id'=>'payments.id'])
|
||||
|
Reference in New Issue
Block a user