Skip to content

Instantly share code, notes, and snippets.

View worstn8mare's full-sized avatar

Ariel Pepito worstn8mare

View GitHub Profile
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
use App\BillSubDetail;
use App\SDDetail;
use App\BillDetail;
use App\WhTaxType;
<?php
namespace App\Http\Controllers\Property;
use App\Http\Controllers\Controller;
use Session;
use App\PropertyAssets;
use Response;
use Input;
use App\UnitType;
use App\PropertyUnit;
class ARoom extends Sugo
{
private protected $room_a;
public function __construct($jilly,$ariel) {
$this->jilly;
$this->ariel;
}
public function sex()
//////////////////////
$cm_header = CmHeader::leftJoin('partners','cm_headers.partner_id','=','partners.id')
->select('cm_headers.partner_id as partner_id',DB::Raw('sum(cm_headers.db_total) as total'),'partners.name as partner_name')
->whereIn('cm_headers.status',['Approved','Printed'])
->where('cm_headers.balance','>', 0)
->where('cm_headers.cb',$cb)
->where('partners.name','like','%'.$p_name.'%');
->groupBy('cm_headers.partner_id');
->orderBy('partners.name','asc');
$search = Partner::with(['memo' => function($query) use ($cb){
$q = $query->select('partner_id','db_total')->from(with(new CmHeader)->getTable())
->whereIn('status',['Approved','Printed'])
->where('balance', '>', 0)
->where('cb',$cb);
$query->select('partner_id','db_total')->from(with(new DmHeader)->getTable())
->whereIn('status',['Approved','Printed'])
->where('balance', '>', 0)
->where('cb',$cb)
/*
ecompact ang input ug array $input_holder
*/
function bogart($input_holder){
$where = '';
if($date_from && $date_to){
$where += 'and sd_headers.dr_date >= '.$date_from.' and sd_headers.dr_date <= '.$date_to;
}
if($category_id){
<script type="text/javascript">
function plus(operator,value){
/* code here*/
return result;
}
function divide(operator,value){
/* code here*/
/**** sample *****/
function addition(first = 0, second = 0) {
var a = parseFloat(first);
var b = parseFloat(second);
var total = 0;
total = a + b;
return total;
}
/**** sample *****/
function addition(first = 0, second = 0) {
var a = parseFloat(first);
var b = parseFloat(second);
var total = 0;
total = a + b;
return total;
}
// /**** sample *****/
function addition(first = 0, second = 0) {
var a = parseFloat(first);
var b = parseFloat(second);
var total = 0;
total = a + b;
return total;
}